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.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user