forked from h2zero/esp-nimble-cpp
fix(NimBLEDevice): fix crash when pairing table is full
* Add missing definition for default device callbacks (which prevents calling the `setDeviceCallbacks` method) * Ensure `m_pDeviceCallbacks` inital value is set to `&defaultDeviceCallbacks` to prevent crash when pairing table is full After #295 any time the pairing table fills up, the device will crash on the next pairing attempt.
This commit is contained in:
@ -76,7 +76,8 @@ extern "C" void ble_store_config_init(void);
|
||||
/**
|
||||
* Singletons for the NimBLEDevice.
|
||||
*/
|
||||
NimBLEDeviceCallbacks* NimBLEDevice::m_pDeviceCallbacks = nullptr;
|
||||
NimBLEDeviceCallbacks NimBLEDevice::defaultDeviceCallbacks{};
|
||||
NimBLEDeviceCallbacks* NimBLEDevice::m_pDeviceCallbacks = &defaultDeviceCallbacks;
|
||||
|
||||
# if defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
|
||||
NimBLEScan* NimBLEDevice::m_pScan = nullptr;
|
||||
|
Reference in New Issue
Block a user