Skip to content

Commit

Permalink
drivers/modem/alt1250: Fix issue where the program would get stuck
Browse files Browse the repository at this point in the history
Fix issue where the program would get stuck
if an unsupported ALTCOM packet was sent.
  • Loading branch information
SPRESENSE committed Sep 24, 2024
1 parent 8288fe4 commit 53b3f3d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/modem/alt1250/alt1250.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,24 @@ static int parse_altcompkt(FAR struct alt1250_dev_s *dev, FAR uint8_t *pkt,
if (*container)
{
(*container)->result = -ENOSYS;
*bitmap = get_bitmap(dev, cid, get_altver(h));
if (LTE_IS_ASYNC_CMD((*container)->cmdid))
{
/* Asynchronous types need to call the callback corresponding
* to the received event, so the REPLY bit is added to the
* received event.
*/

*bitmap |= ALT1250_EVTBIT_REPLY;
}
else
{
/* Synchronous types do not call a callback,
* so only the REPLY bit is needed.
*/

*bitmap = ALT1250_EVTBIT_REPLY;
}
}

return *container == NULL ? ERROR: OK;
Expand Down

0 comments on commit 53b3f3d

Please sign in to comment.