From 5bc8443c381d4165e487ca99749ccd52d291ed26 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Fri, 11 Dec 2020 12:33:23 +0100 Subject: [PATCH] at: be less strict when checking for error The response can include the command and an error number, so we want to only check it contains ERROR, even if it's replying more than just the 'ERROR' string. --- src/at.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/at.c b/src/at.c index 7e53c52..069fed0 100644 --- a/src/at.c +++ b/src/at.c @@ -181,7 +181,7 @@ static gboolean modem_response(gint fd, if (strcmp(response, "RDY") == 0) manager->modem_state = EG25_STATE_STARTED; - else if (strcmp(response, "ERROR") == 0) + else if (strstr(response, "ERROR")) retry_at_command(manager); else if (strstr(response, "OK")) process_at_result(manager, response);