Skip to content

Commit 1a49b41

Browse files
aaronyegxfabiobaltieri
authored andcommitted
samples: Bluetooth: peripheral_past: fix the uninitialized parameter
The past_param.options is uninitialized and causes bt_le_per_adv_sync_transfer_subscribe() returning error. Signed-off-by: Aaron Ye <[email protected]>
1 parent 2fbefdb commit 1a49b41

File tree

1 file changed

+1
-0
lines changed
  • samples/bluetooth/peripheral_past/src

1 file changed

+1
-0
lines changed

samples/bluetooth/peripheral_past/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ int main(void)
139139
printk("Subscribing to periodic advertising sync transfers\n");
140140
past_param.skip = 1;
141141
past_param.timeout = 1000; /* 10 seconds */
142+
past_param.options = BT_LE_PER_ADV_SYNC_TRANSFER_OPT_NONE;
142143
err = bt_le_per_adv_sync_transfer_subscribe(NULL /* any peer */,
143144
&past_param);
144145
if (err) {

0 commit comments

Comments
 (0)