aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-at-serial-port.c
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-05-16 11:21:01 -0500
committerDan Williams <dan@ioncontrol.co>2025-05-22 08:05:58 -0500
commitc3c6fdc55e5a45f9bf0611ec0925fd0702aff316 (patch)
treef6ab6714e3da04b954761598e3c73153c81588b5 /src/tests/test-at-serial-port.c
parent24f9309d6ecd559d24c54391fadef76cdbde1097 (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/tests/test-at-serial-port.c')
-rw-r--r--src/tests/test-at-serial-port.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/test-at-serial-port.c b/src/tests/test-at-serial-port.c
index 5592971d..bd608461 100644
--- a/src/tests/test-at-serial-port.c
+++ b/src/tests/test-at-serial-port.c
@@ -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[] = {