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>
This commit is contained in:
Dan Williams
2025-05-22 08:05:58 -05:00
parent 24f9309d6e
commit c3c6fdc55e
3 changed files with 39 additions and 5 deletions
+2
View File
@@ -46,6 +46,8 @@ static const EchoRemovalTest echo_removal_tests[] = {
{ "echo echo\r\nthis is valid\r\nand so is this", "\r\nthis is valid\r\nand so is this" },
{ "\r\nthis is valid\r\nand so is this", "\r\nthis is valid\r\nand so is this" },
{ "\r\nthis is valid\r\nand so is this\r\n", "\r\nthis is valid\r\nand so is this\r\n" },
{ "\nNO CARRIER\r\n", "\nNO CARRIER\r\n" },
{ "\nCONNECT\r\n", "\nCONNECT\r\n" },
};
static const ParseResponseTest parse_ok_tests[] = {