mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fixed_multi_conn_example_crash_issue' into 'master'
fix(nimble): fiexed the crash issue of examples/bluetooth/nimble/ble_multi_conn See merge request espressif/esp-idf!33491
This commit is contained in:
commit
5f6971bfa7
@ -194,9 +194,9 @@ ble_prph_gap_event(struct ble_gap_event *event, void *arg)
|
|||||||
/* A new connection was established. */
|
/* A new connection was established. */
|
||||||
ESP_LOGI(TAG, "Connection established. Handle:%d. Total:%d", event->connect.conn_handle,
|
ESP_LOGI(TAG, "Connection established. Handle:%d. Total:%d", event->connect.conn_handle,
|
||||||
++s_ble_prph_conn_num);
|
++s_ble_prph_conn_num);
|
||||||
#if !CONFIG_EXAMPLE_EXTENDED_ADV && CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
|
#if CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
|
||||||
ble_prph_restart_adv();
|
ble_prph_restart_adv();
|
||||||
#endif // !CONFIG_EXAMPLE_EXTENDED_ADV && CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
|
#endif //CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
|
||||||
} else {
|
} else {
|
||||||
/* Restart the advertising */
|
/* Restart the advertising */
|
||||||
ble_prph_restart_adv();
|
ble_prph_restart_adv();
|
||||||
@ -214,9 +214,6 @@ ble_prph_gap_event(struct ble_gap_event *event, void *arg)
|
|||||||
#if CONFIG_EXAMPLE_EXTENDED_ADV
|
#if CONFIG_EXAMPLE_EXTENDED_ADV
|
||||||
case BLE_GAP_EVENT_ADV_COMPLETE:
|
case BLE_GAP_EVENT_ADV_COMPLETE:
|
||||||
ESP_LOGI(TAG, "advertisement completed. Reason=%d.",event->adv_complete.reason);
|
ESP_LOGI(TAG, "advertisement completed. Reason=%d.",event->adv_complete.reason);
|
||||||
#if CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
|
|
||||||
ble_prph_restart_adv();
|
|
||||||
#endif // CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif // CONFIG_EXAMPLE_EXTENDED_ADV
|
#endif // CONFIG_EXAMPLE_EXTENDED_ADV
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user