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:
Emil Gydesen 2022-12-15 20:04:27 +01:00 committed by Fabio Baltieri
commit f4ff8f2230

View file

@ -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)",