mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(nimble): Bugfixes for various issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -331,7 +331,9 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
|
||||
}
|
||||
if (event->connect.status != 0) {
|
||||
/* Connection failed; resume advertising. */
|
||||
((void(*)(void))arg)();
|
||||
if (arg != NULL) {
|
||||
((void(*)(void))arg)();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case BLE_GAP_EVENT_DISCONNECT:
|
||||
@@ -366,7 +368,9 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
|
||||
case BLE_GAP_EVENT_ADV_COMPLETE:
|
||||
ESP_LOGI(TAG, "advertise complete; reason=%d",
|
||||
event->adv_complete.reason);
|
||||
((void(*)(void))arg)();
|
||||
if (arg != NULL) {
|
||||
((void(*)(void))arg)();
|
||||
}
|
||||
return 0;
|
||||
|
||||
case BLE_GAP_EVENT_SUBSCRIBE:
|
||||
|
||||
Reference in New Issue
Block a user