BLE - Register the Att call handler whenever the GATT_SERVER is available.

pull/9907/head
Vincent Coubard 2019-03-01 18:33:22 +00:00
parent 77511c3983
commit b21e1d23d5
1 changed files with 4 additions and 1 deletions

View File

@ -509,11 +509,14 @@ void BLE::stack_setup()
DmConnRegister(DM_CLIENT_ID_APP, BLE::device_manager_cb);
#endif
#if BLE_FEATURE_GATT_SERVER
AttConnRegister(BLE::connection_handler);
#endif
#if BLE_FEATURE_ATT
#if BLE_FEATURE_GATT_CLIENT
AttRegister((attCback_t) ble::pal::vendor::cordio::CordioAttClient::att_client_handler);
#else
AttConnRegister(BLE::connection_handler);
AttRegister((attCback_t) ble::vendor::cordio::GattServer::att_cb);
#endif // BLE_FEATURE_GATT_CLIENT
#endif