Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions nimble/transport/common/hci_h4/src/hci_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,16 @@ hci_h4_sm_rx(struct hci_h4_sm *h4sm, const uint8_t *buf, uint16_t len)
/* no break */
case HCI_H4_SM_W4_HEADER:
rc = hci_h4_sm_w4_header(h4sm, &ib);
assert(rc >= 0);
if (rc) {
/* rc == 1: need more data; rc < 0: alloc failed, propagate
* to caller so it can back off and retry instead of crashing.
*/
break;
}
h4sm->state = HCI_H4_SM_W4_PAYLOAD;
/* no break */
case HCI_H4_SM_W4_PAYLOAD:
rc = hci_h4_sm_w4_payload(h4sm, &ib);
assert(rc >= 0);
if (rc) {
break;
}
Expand Down
Loading