drivers: modem: gsm: +CGATT shouldn't give sem_response & set error

The +CGATT: is followed by 'OK' or 'ERROR', so its handler
should not set error code and give sem_response.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2022-02-20 17:19:58 +08:00 committed by Marti Bolivar
commit 6bf44c5af5

View file

@ -449,17 +449,11 @@ static const struct setup_cmd setup_cmds[] = {
MODEM_CMD_DEFINE(on_cmd_atcmdinfo_attached)
{
int error = -EAGAIN;
/* Expected response is "+CGATT: 0|1" so simply look for '1' */
if (argc && atoi(argv[0]) == 1) {
error = 0;
LOG_INF("Attached to packet service!");
}
modem_cmd_handler_set_error(data, error);
k_sem_give(&gsm.sem_response);
return 0;
}