diff options
author | Dan Williams <dcbw@redhat.com> | 2011-08-02 12:43:26 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-08-02 12:43:26 -0500 |
commit | 804cd7f07710362a6454fbf2cee689492b3060d4 (patch) | |
tree | e675be64899c565225c81759317aefab7b9743e6 | |
parent | 7985a27321274e4087023e383276d3cbf73359bc (diff) |
gsm: work around Motorola Android phone modem bugs (bgo #637327)
It seems the Motorola Flipout with Android 2.1 doesn't like to return
configured PDP contexts via AT+CGDCONT?; it returns an error. It
seems to accept the rest of the dial sequence though, so just ignore
the error when reading existing PDP contexts.
-rw-r--r-- | src/mm-generic-gsm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c index a3a1833e..674b78f5 100644 --- a/src/mm-generic-gsm.c +++ b/src/mm-generic-gsm.c @@ -3622,7 +3622,12 @@ existing_apns_read (MMAtSerialPort *port, return; if (error) { - info->error = g_error_copy (error); + /* Some Android phones don't support querying existing PDP contexts, + * but will accept setting the APN. So if CGDCONT? isn't supported, + * just ignore that error and hope for the best. (bgo #637327) + */ + if (g_error_matches (error, MM_MOBILE_ERROR, MM_MOBILE_ERROR_NOT_SUPPORTED) == FALSE) + info->error = g_error_copy (error); } else if (g_str_has_prefix (response->str, "+CGDCONT:")) { GRegex *r; GMatchInfo *match_info; |