gsm: CGDCONT parsing fixes (bgo #602552)

Ignore spaces and account for random parentheses in the CGDCONT
response.  Also fixes parsing CGDCONT=? on nozomi.
This commit is contained in:
Dan Williams
2009-11-26 13:52:50 -08:00
parent 8dd2421e9c
commit 15595b33dc
+2 -2
View File
@@ -1319,7 +1319,7 @@ cid_range_read (MMSerialPort *port,
GRegex *r;
GMatchInfo *match_info;
r = g_regex_new ("\\+CGDCONT: \\((\\d+)-(\\d+)\\),\"(\\S+)\"",
r = g_regex_new ("\\+CGDCONT:\\s*\\((\\d+)-(\\d+)\\),\\(?\"(\\S+)\"",
G_REGEX_DOLLAR_ENDONLY | G_REGEX_RAW,
0, &info->error);
if (r) {
@@ -1385,7 +1385,7 @@ existing_apns_read (MMSerialPort *port,
GRegex *r;
GMatchInfo *match_info;
r = g_regex_new ("\\+CGDCONT: (\\d+)\\s*,\"(\\S+)\",\"(\\S+)\",\"(\\S+)\"",
r = g_regex_new ("\\+CGDCONT:\\s*(\\d+)\\s*,\"(\\S+)\",\"(\\S+)\",\"(\\S*)\"",
G_REGEX_DOLLAR_ENDONLY | G_REGEX_RAW,
0, &info->error);
if (r) {