mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
NimBLE: Fixed crash in multi advertising example.
This commit is contained in:
parent
6fcb8b3f00
commit
1117bd8ab0
@ -156,6 +156,8 @@ start_legacy_duration(void)
|
||||
struct ble_gap_ext_adv_params params;
|
||||
int size_pattern = sizeof(legacy_dur_adv_pattern) / sizeof(legacy_dur_adv_pattern[0]);
|
||||
|
||||
memset (¶ms, 0, sizeof(params));
|
||||
|
||||
params.legacy_pdu = 1;
|
||||
params.own_addr_type = BLE_OWN_ADDR_RANDOM;
|
||||
params.sid = 3;
|
||||
@ -179,6 +181,8 @@ start_scannable_legacy_ext(void)
|
||||
struct ble_gap_ext_adv_params params;
|
||||
int size_pattern = sizeof(scannable_legacy_adv_pattern)/sizeof(scannable_legacy_adv_pattern[0]);
|
||||
|
||||
memset (¶ms, 0, sizeof(params));
|
||||
|
||||
params.legacy_pdu = 1;
|
||||
params.scannable = 1;
|
||||
params.own_addr_type = BLE_OWN_ADDR_RANDOM;
|
||||
@ -203,6 +207,8 @@ start_connectable_ext(void)
|
||||
struct ble_gap_ext_adv_params params;
|
||||
int size_pattern = sizeof(connectable_adv_pattern) / sizeof(connectable_adv_pattern[0]);
|
||||
|
||||
memset (¶ms, 0, sizeof(params));
|
||||
|
||||
params.connectable = 1;
|
||||
params.own_addr_type = BLE_OWN_ADDR_RANDOM;
|
||||
params.sid = 1;
|
||||
@ -224,6 +230,8 @@ start_non_connectable_ext(void)
|
||||
struct ble_gap_ext_adv_params params;
|
||||
int size_pattern = sizeof(non_conn_adv_pattern) / sizeof(non_conn_adv_pattern[0]);
|
||||
|
||||
memset (¶ms, 0, sizeof(params));
|
||||
|
||||
params.own_addr_type = BLE_OWN_ADDR_RANDOM;
|
||||
params.sid = 0;
|
||||
params.primary_phy = BLE_HCI_LE_PHY_1M;
|
||||
|
Loading…
x
Reference in New Issue
Block a user