Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions src/NimBLEServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,15 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) {
break;
} // BLE_GAP_EVENT_NOTIFY_TX

# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
case BLE_GAP_EVENT_NOTIFY_RX: {
if (pServer->m_pClient && pServer->m_pClient->m_connHandle == event->notify_rx.conn_handle) {
NimBLEClient::handleGapEvent(event, pServer->m_pClient);
}
break;
} // BLE_GAP_EVENT_NOTIFY_RX
# endif

case BLE_GAP_EVENT_ADV_COMPLETE: {
# if MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER)
case BLE_GAP_EVENT_SCAN_REQ_RCVD:
Expand Down
12 changes: 6 additions & 6 deletions src/nimble/esp_port/esp-hci/src/esp_nimble_hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len)
m = ble_transport_alloc_acl_from_ll();

if (!m) {
esp_rom_printf("Failed to allocate buffer, retrying ");
/* Give some time to free buffer and try again */
vTaskDelay(1);
}
}while(!m);
esp_rom_printf("Failed to allocate buffer, retrying\n");
/* Give some time to free buffer and try again */
vTaskDelay(pdMS_TO_TICKS(10));
}
} while(!m);

if ((rc = os_mbuf_append(m, data, len)) != 0) {
esp_rom_printf("%s failed to os_mbuf_append; rc = %d", __func__, rc);
esp_rom_printf("%s failed to os_mbuf_append; rc = %d\n", __func__, rc);
os_mbuf_free_chain(m);
return;
}
Expand Down