diff options
author | Dan Williams <dan@ioncontrol.co> | 2025-05-16 11:21:01 -0500 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2025-05-22 08:05:58 -0500 |
commit | c3c6fdc55e5a45f9bf0611ec0925fd0702aff316 (patch) | |
tree | f6ab6714e3da04b954761598e3c73153c81588b5 /src/mm-modem-helpers.c | |
parent | 24f9309d6ecd559d24c54391fadef76cdbde1097 (diff) |
serial-parsers: don't echo-remove strange call start/end URCs
Some Sierra devices omit the leading <CR> from call start/end URCs
like NO CARRIER and CONNECT, which caused the echo-removal code to
remove from the response buffer because the leading <CR><LF> did
not exist. That can break call control and hangup handling on
those devices.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r-- | src/mm-modem-helpers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index c6fa13fc..d69951be 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -487,8 +487,12 @@ mm_call_end_regex_get (void) { /* Example: * <CR><LF>NO ANSWER<CR><LF> + * <LF>NO CARRIER<CR><LF> + * <CR><LF>BUSY<CR><LF> + * + * Some Sierra devices omit the leading <CR> for in-call responses. */ - return g_regex_new ("\\r\\n(NO CARRIER)|(BUSY)|(NO ANSWER)|(NO DIALTONE)\\r\\n", + return g_regex_new ("(\\r)?\\n(NO CARRIER)|(BUSY)|(NO ANSWER)|(NO DIALTONE)\\r\\n", G_REGEX_DOLLAR_ENDONLY | G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); |