Skip to content

Commit a48acb6

Browse files
committed
[Bugfix] make sure the notify event is sent to server created clients
1 parent 66fbe50 commit a48acb6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/NimBLEServer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,15 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) {
493493
break;
494494
} // BLE_GAP_EVENT_NOTIFY_TX
495495

496+
# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
497+
case BLE_GAP_EVENT_NOTIFY_RX: {
498+
if (pServer->m_pClient && pServer->m_pClient->m_connHandle == event->notify_rx.conn_handle) {
499+
NimBLEClient::handleGapEvent(event, pServer->m_pClient);
500+
}
501+
break;
502+
} // BLE_GAP_EVENT_NOTIFY_RX
503+
# endif
504+
496505
case BLE_GAP_EVENT_ADV_COMPLETE: {
497506
# if MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER)
498507
case BLE_GAP_EVENT_SCAN_REQ_RCVD:

0 commit comments

Comments
 (0)