diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index 4c0002d53..928214537 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -163,8 +163,6 @@ struct ble_gap_adv_reattempt_ctxt { struct ble_gap_ext_adv_params params; int8_t selected_tx_power; uint8_t selected_tx_power_present:1; - uint8_t data[1650]; - uint16_t data_len; int duration; int max_events; #endif @@ -1326,12 +1324,6 @@ int ble_gap_slave_adv_reattempt(void) } ble_adv_reattempt.retry = 1; - rc = ble_gap_ext_adv_set_data(ble_adv_reattempt.instance, - ble_hs_mbuf_from_flat(ble_adv_reattempt.data, ble_adv_reattempt.data_len)); - - if (rc != 0) { - return rc; - } rc = ble_gap_ext_adv_start(ble_adv_reattempt.instance, ble_adv_reattempt.duration, ble_adv_reattempt.max_events); @@ -4019,7 +4011,6 @@ ble_gap_adv_set_fields(const struct ble_hs_adv_fields *adv_fields) return 0; #else - printf("advertise is not enabled and ext disabled \n"); return BLE_HS_ENOTSUP; #endif } @@ -4757,15 +4748,10 @@ ble_gap_ext_adv_set_data(uint8_t instance, struct os_mbuf *data) } #if MYNEWT_VAL(BLE_ENABLE_CONN_REATTEMPT) && NIMBLE_BLE_CONNECT - uint16_t len = OS_MBUF_PKTLEN(data); - ble_adv_reattempt.type = 1; ble_adv_reattempt.instance = instance; - - if (!ble_adv_reattempt.retry) { - ble_hs_mbuf_to_flat(data, ble_adv_reattempt.data, len, &ble_adv_reattempt.data_len); - } else { + if (ble_adv_reattempt.retry) { ble_adv_reattempt.retry = 0; } #endif