aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ham <bob.ham@puri.sm>2020-02-04 11:21:34 +0000
committerBob Ham <bob.ham@puri.sm>2020-02-06 15:16:46 +0000
commita7a8fc909abeb0abe092feb2603d27216f0e1325 (patch)
tree7d3c67d406558b999c29f4d71a7fb8bf74619f61
parent38d7cc6683008394f51cadc6b66446ba96c5f388 (diff)
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.
-rw-r--r--src/mm-broadband-modem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 61ceae8b..6b7687f3 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -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);