serial-parsers: also match OK responses that are not at end of line

Do not fail to detect a valid response with a call or text incoming.
This happens also during port probing when there's no URC parsers
installed in the serial port. This probably will not happen when the
serial port was managed by the modem object.
This commit is contained in:
Dylan Van Assche
2020-11-25 19:58:25 +01:00
committed by Aleksander Morgado
parent 446d497040
commit 750fb2bc4a

View File

@@ -108,7 +108,7 @@ mm_serial_parser_v1_new (void)
parser = g_slice_new (MMSerialParserV1);
parser->regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+$", flags, 0, NULL);
parser->regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+", flags, 0, NULL);
parser->regex_connect = g_regex_new ("\\r\\nCONNECT.*\\r\\n", flags, 0, NULL);
parser->regex_sms = g_regex_new ("\\r\\n>\\s*$", flags, 0, NULL);
parser->regex_cme_error = g_regex_new ("\\r\\n\\+CME ERROR:\\s*(\\d+)\\r\\n$", flags, 0, NULL);