diff --git a/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/main/main.c b/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/main/main.c index 5067899880..e32cd6355f 100644 --- a/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/main/main.c +++ b/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/main/main.c @@ -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(); @@ -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