Skip to content

Commit

Permalink
Codrio BLE: ignore packet if data allocation fails (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
Diff-fusion authored Nov 21, 2024
1 parent 784417f commit 92df629
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,15 @@ void hciTrSerialRxIncoming(uint8_t *pBuf, uint8_t len)
}
else
{
/**
* As above, simply employing WSF_ASSERT is not reasonable.
* Instead, it is advisable to discard this data packet,
* exit the packet processing function,
* and adjust the stateRx back to HCI_RX_STATE_IDLE.
*/
stateRx = HCI_RX_STATE_IDLE;
WSF_ASSERT(0); /* allocate falied */
return;
}

}
Expand Down

0 comments on commit 92df629

Please sign in to comment.