Skip to content

Commit b21e1d2

Browse files
committed
BLE - Register the Att call handler whenever the GATT_SERVER is available.
1 parent 77511c3 commit b21e1d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,14 @@ void BLE::stack_setup()
509509
DmConnRegister(DM_CLIENT_ID_APP, BLE::device_manager_cb);
510510
#endif
511511

512+
#if BLE_FEATURE_GATT_SERVER
513+
AttConnRegister(BLE::connection_handler);
514+
#endif
515+
512516
#if BLE_FEATURE_ATT
513517
#if BLE_FEATURE_GATT_CLIENT
514518
AttRegister((attCback_t) ble::pal::vendor::cordio::CordioAttClient::att_client_handler);
515519
#else
516-
AttConnRegister(BLE::connection_handler);
517520
AttRegister((attCback_t) ble::vendor::cordio::GattServer::att_cb);
518521
#endif // BLE_FEATURE_GATT_CLIENT
519522
#endif

0 commit comments

Comments
 (0)