mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2025-02-22 14:08:54 +01:00
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:
parent
60efffdf2b
commit
74b5c59887
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ extern "C" void ble_store_config_init(void);
|
||||||
/**
|
/**
|
||||||
* Singletons for the NimBLEDevice.
|
* Singletons for the NimBLEDevice.
|
||||||
*/
|
*/
|
||||||
NimBLEDeviceCallbacks* NimBLEDevice::m_pDeviceCallbacks = nullptr;
|
NimBLEDeviceCallbacks NimBLEDevice::defaultDeviceCallbacks{};
|
||||||
|
NimBLEDeviceCallbacks* NimBLEDevice::m_pDeviceCallbacks = &defaultDeviceCallbacks;
|
||||||
|
|
||||||
# if defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
|
# if defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
|
||||||
NimBLEScan* NimBLEDevice::m_pScan = nullptr;
|
NimBLEScan* NimBLEDevice::m_pScan = nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue