broadband-modem: allow no whitespaces before CPIN? reply value

This commit is contained in:
Aleksander Morgado
2012-03-15 14:15:06 +01:00
parent 2a12322a80
commit f72f68b311
+5 -2
View File
@@ -809,11 +809,14 @@ cpin_query_ready (MMIfaceModem *self,
}
if (result &&
strstr (result, "+CPIN: ")) {
strstr (result, "+CPIN:")) {
CPinResult *iter = &unlock_results[0];
const gchar *str;
str = strstr (result, "+CPIN: ") + 7;
str = strstr (result, "+CPIN:") + 6;
/* Skip possible whitespaces after '+CPIN:' and before the response */
while (*str == ' ')
str++;
/* Some phones (Motorola EZX models) seem to quote the response */
if (str[0] == '"')