modem-helpers: improve +CMTI indication regex

Allow whitespaces added in several places, like between the comma and the index,
which is what the Cinterion PHS8 does:
  <CR><LF>+CMTI: "MT", 5<CR><LF>
This commit is contained in:
Aleksander Morgado
2014-06-25 17:40:06 +02:00
parent 9637c1ed38
commit 4406b1e6ec

View File

@@ -495,7 +495,7 @@ mm_3gpp_cusd_regex_get (void)
GRegex * GRegex *
mm_3gpp_cmti_regex_get (void) mm_3gpp_cmti_regex_get (void)
{ {
return g_regex_new ("\\r\\n\\+CMTI: \"(\\S+)\",(\\d+)\\r\\n", return g_regex_new ("\\r\\n\\+CMTI:\\s*\"(\\S+)\",\\s*(\\d+)\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, G_REGEX_RAW | G_REGEX_OPTIMIZE,
0, 0,
NULL); NULL);