mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
fix(nimble): Avoid ext adv data in reattempt advertising
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user