Skip to content

Commit 80d0f6c

Browse files
committed
Merge branch 'nimble/add_error_prints_acl_buf' into 'master'
NimBLE: Add error prints for ACL buffer exhaustion in NPL See merge request espressif/esp-idf!12665
2 parents bd7591b + 5d80d55 commit 80d0f6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/bt/host/nimble/esp-hci/src/esp_nimble_hci.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ static struct os_mbuf *ble_hci_trans_acl_buf_alloc(void)
252252
static void ble_hci_rx_acl(uint8_t *data, uint16_t len)
253253
{
254254
struct os_mbuf *m;
255+
int rc;
255256
int sr;
256257
if (len < BLE_HCI_DATA_HDR_SZ || len > MYNEWT_VAL(BLE_ACL_BUF_SIZE)) {
257258
return;
@@ -260,9 +261,11 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len)
260261
m = ble_hci_trans_acl_buf_alloc();
261262

262263
if (!m) {
264+
ESP_LOGE(TAG, "%s failed to allocate ACL buffers; increase ACL_BUF_COUNT", __func__);
263265
return;
264266
}
265-
if (os_mbuf_append(m, data, len)) {
267+
if ((rc = os_mbuf_append(m, data, len)) != 0) {
268+
ESP_LOGE(TAG, "%s failed to os_mbuf_append; rc = %d", __func__, rc);
266269
os_mbuf_free_chain(m);
267270
return;
268271
}

0 commit comments

Comments
 (0)