Codrio BLE: ignore packet if data allocation fails (#384)

pull/15530/head
Diff-fusion 2024-11-21 09:25:48 +01:00 committed by GitHub
parent 784417f65c
commit 92df6292cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -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;
}
}