broadband-modem: add optional extra carriage return to in-call URC regex

The BroadMobi BM818 has inconsitent line endings and the in-call URC
regex can miss events, particularly NO CARRIER, because the regex
doesn't match.  To fix this we add an optional carriage return to the
regex.  This will match for the BM818's output.
This commit is contained in:
Bob Ham
2020-02-06 15:16:46 +00:00
parent 38d7cc6683
commit a7a8fc909a
+1 -1
View File
@@ -7633,7 +7633,7 @@ set_voice_in_call_unsolicited_events_handlers (MMBroadbandModem *self,
GRegex *in_call_event_regex;
guint i;
in_call_event_regex = g_regex_new ("\\r\\n(NO CARRIER|BUSY|NO ANSWER|NO DIALTONE)\\r\\n$",
in_call_event_regex = g_regex_new ("\\r\\n(NO CARRIER|BUSY|NO ANSWER|NO DIALTONE)(\\r)?\\r\\n$",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
ports[0] = MM_PORT_SERIAL_AT (ports_ctx->primary);