Skip to content

Commit 3f531cf

Browse files
RM-AlltronsAdmin
authored andcommitted
Added onDisconnect with gatt parameters to BLUEServerCallbacks, equivalent to the existing onConnect (espressif#7559)
Co-authored-by: Admin <[email protected]>
1 parent 523c7a7 commit 3f531cf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libraries/BLE/src/BLEServer.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,12 @@ void BLEServerCallbacks::onDisconnect(BLEServer* pServer) {
374374
log_d("BLEServerCallbacks", "<< onDisconnect()");
375375
} // onDisconnect
376376

377+
void BLEServerCallbacks::onDisconnect(BLEServer* pServer, esp_ble_gatts_cb_param_t* param) {
378+
log_d("BLEServerCallbacks", ">> onDisconnect(): Default");
379+
log_d("BLEServerCallbacks", "Device: %s", BLEDevice::toString().c_str());
380+
log_d("BLEServerCallbacks", "<< onDisconnect()");
381+
} // onDisconnect
382+
377383
void BLEServerCallbacks::onMtuChanged(BLEServer* pServer, esp_ble_gatts_cb_param_t* param) {
378384
log_d("BLEServerCallbacks", ">> onMtuChanged(): Default");
379385
log_d("BLEServerCallbacks", "Device: %s MTU: %d", BLEDevice::toString().c_str(), param->mtu.mtu);

libraries/BLE/src/BLEServer.h

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class BLEServerCallbacks {
134134
* @param [in] pServer A reference to the %BLE server that received the existing client disconnection.
135135
*/
136136
virtual void onDisconnect(BLEServer* pServer);
137+
virtual void onDisconnect(BLEServer* pServer, esp_ble_gatts_cb_param_t *param);
137138

138139
/**
139140
* @brief Handle a new client connection.

0 commit comments

Comments
 (0)