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.
This commit is contained in:
Dan Williams
2011-08-02 12:43:26 -05:00
parent 7985a27321
commit 804cd7f077
+6 -1
View File
@@ -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;