gsm: allow no whitespaces before CPIN? reply value

This commit is contained in:
Aleksander Morgado
2012-02-17 13:25:02 +01:00
parent b714441272
commit 7cbc8f3b80
+6 -2
View File
@@ -307,8 +307,12 @@ pin_check_done (MMAtSerialPort *port,
if (error)
info->error = g_error_copy (error);
else if (response && strstr (response->str, "+CPIN: ")) {
const char *str = strstr (response->str, "+CPIN: ") + 7;
else if (response && strstr (response->str, "+CPIN:")) {
const char *str = strstr (response->str, "+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] == '"')