aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-08-31 10:08:11 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-31 10:08:11 +0200
commit19e91c5c79f5f824c309c8d11c0b148ca8b0955e (patch)
treeb03c63b134a07e50430291d70017d390fdd8e7ba /src
parentf53e53ba3738f3d24465ea577781b6c3ed6f6083 (diff)
sim: better handling of IMSI response
This is a port to git master of the following commit: commit 0b051f9c7033143c56f59267794d1cadf4bd3416 Author: Dan Williams <dcbw@redhat.com> Date: Mon Aug 27 10:24:50 2012 -0500 gsm: better handling of IMSI response Moto EZX devices prefix the response with "+CIMI:" while most devices do not.
Diffstat (limited to 'src')
-rw-r--r--src/mm-sim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mm-sim.c b/src/mm-sim.c
index a63fdfba..7cdb356b 100644
--- a/src/mm-sim.c
+++ b/src/mm-sim.c
@@ -1074,7 +1074,9 @@ parse_imsi (const gchar *response,
g_assert (response != NULL);
- for (s = response, len = 0; *s; ++s, ++len) {
+ for (s = mm_strip_tag (response, "+CIMI"), len = 0;
+ *s;
+ ++s, ++len) {
/* IMSI is a number with 15 or less decimal digits. */
if (!isdigit (*s) || len > 15) {
g_set_error (error,