samples: Bluetooth: ISO broadcast receiver pa_interval check move
Move the check for the pa_interval to before we start parsing the data for the name, as that is more optimized. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
bc1bb4f63c
commit
f4ff8f2230
1 changed files with 5 additions and 5 deletions
|
@ -86,6 +86,11 @@ static void scan_recv(const struct bt_le_scan_recv_info *info,
|
|||
return;
|
||||
}
|
||||
|
||||
if (info->interval == 0U) {
|
||||
/* Not broadcast periodic advertising - Ignore */
|
||||
return;
|
||||
}
|
||||
|
||||
(void)memset(name, 0, sizeof(name));
|
||||
|
||||
bt_data_parse(buf, data_cb, name);
|
||||
|
@ -94,11 +99,6 @@ static void scan_recv(const struct bt_le_scan_recv_info *info,
|
|||
return;
|
||||
}
|
||||
|
||||
if (info->interval == 0U) {
|
||||
/* Not broadcast periodic advertising - Ignore */
|
||||
return;
|
||||
}
|
||||
|
||||
bt_addr_le_to_str(info->addr, le_addr, sizeof(le_addr));
|
||||
|
||||
LOG_INF("Found broadcaster with address %s (RSSI %i)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue