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