mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 07:12:08 +02:00
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:
2
src/at.c
2
src/at.c
@@ -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);
|
||||||
|
Reference in New Issue
Block a user