Skip to content

Commit

Permalink
Merge branch 'bugfix/fixed_multi_conn_example_crash_issue_5.3' into '…
Browse files Browse the repository at this point in the history
…release/v5.3'

fix(ble): fiexed the crash issue of examples/bluetooth/nimble/ble_multi_conn

See merge request espressif/esp-idf!33492
  • Loading branch information
Isl2017 committed Sep 13, 2024
2 parents df00c22 + dfead07 commit 2c621ed
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ ble_prph_gap_event(struct ble_gap_event *event, void *arg)
/* A new connection was established. */
ESP_LOGI(TAG, "Connection established. Handle:%d. Total:%d", event->connect.conn_handle,
++s_ble_prph_conn_num);
#if !CONFIG_EXAMPLE_EXTENDED_ADV && CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
ble_prph_restart_adv();
#endif // !CONFIG_EXAMPLE_EXTENDED_ADV && CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
#if CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
ble_prph_restart_adv();
#endif //CONFIG_EXAMPLE_RESTART_ADV_AFTER_CONNECTED
} else {
/* Restart the advertising */
ble_prph_restart_adv();
Expand All @@ -214,9 +214,6 @@ ble_prph_gap_event(struct ble_gap_event *event, void *arg)
#if CONFIG_EXAMPLE_EXTENDED_ADV
case BLE_GAP_EVENT_ADV_COMPLETE:
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;
#endif // CONFIG_EXAMPLE_EXTENDED_ADV

Expand Down

0 comments on commit 2c621ed

Please sign in to comment.