diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-02-14 14:23:18 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:15:06 +0100 |
commit | f72f68b311b5c283494f0ba329c73d053b4a4280 (patch) | |
tree | 35cffde430a42878aedf1154c683d70f03ebf486 | |
parent | 2a12322a80d7c6a41c447c4c6bbfc5810b498b0c (diff) |
broadband-modem: allow no whitespaces before CPIN? reply value
-rw-r--r-- | src/mm-broadband-modem.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index b270acae..b5d20a1c 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -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] == '"') |