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.
This commit is contained in:
Arnaud Ferraris
2020-12-11 12:33:23 +01:00
parent aabe4df41c
commit 5bc8443c38

View File

@@ -181,7 +181,7 @@ static gboolean modem_response(gint fd,
if (strcmp(response, "RDY") == 0) if (strcmp(response, "RDY") == 0)
manager->modem_state = EG25_STATE_STARTED; manager->modem_state = EG25_STATE_STARTED;
else if (strcmp(response, "ERROR") == 0) else if (strstr(response, "ERROR"))
retry_at_command(manager); retry_at_command(manager);
else if (strstr(response, "OK")) else if (strstr(response, "OK"))
process_at_result(manager, response); process_at_result(manager, response);