61
61
62
62
#if defined(CONFIG_BT_BAP_UNICAST )
63
63
64
- struct shell_stream unicast_streams [CONFIG_BT_MAX_CONN *
65
- MAX ( UNICAST_SERVER_STREAM_COUNT , UNICAST_CLIENT_STREAM_COUNT )];
64
+ struct shell_stream unicast_streams [CONFIG_BT_MAX_CONN * MAX ( UNICAST_SERVER_STREAM_COUNT ,
65
+ UNICAST_CLIENT_STREAM_COUNT )] = { 0 } ;
66
66
67
67
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT )
68
- struct unicast_group default_unicast_group ;
68
+ struct unicast_group default_unicast_group = { 0 } ;
69
69
static struct bt_bap_unicast_client_cb unicast_client_cbs ;
70
70
#if CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0
71
- struct bt_bap_ep * snks [CONFIG_BT_MAX_CONN ][CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT ];
71
+ struct bt_bap_ep * snks [CONFIG_BT_MAX_CONN ][CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT ] = { 0 } ;
72
72
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0 */
73
73
#if CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0
74
- struct bt_bap_ep * srcs [CONFIG_BT_MAX_CONN ][CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT ];
74
+ struct bt_bap_ep * srcs [CONFIG_BT_MAX_CONN ][CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT ] = { 0 } ;
75
75
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0 */
76
76
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT */
77
77
#endif /* CONFIG_BT_BAP_UNICAST */
78
78
79
79
#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE )
80
- struct shell_stream broadcast_source_streams [CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT ];
81
- struct broadcast_source default_source ;
80
+ struct shell_stream broadcast_source_streams [CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT ] = { 0 } ;
81
+ struct broadcast_source default_source = { 0 } ;
82
82
#endif /* CONFIG_BT_BAP_BROADCAST_SOURCE */
83
83
#if defined(CONFIG_BT_BAP_BROADCAST_SINK )
84
84
static struct shell_stream broadcast_sink_streams [CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT ];
@@ -2384,8 +2384,11 @@ static void broadcast_scan_recv(const struct bt_le_scan_recv_info *info, struct
2384
2384
2385
2385
bt_addr_le_to_str (info -> addr , addr_str , sizeof (addr_str ));
2386
2386
2387
- bt_shell_print ("Found broadcaster with ID 0x%06X (%s) and addr %s and sid 0x%02X " ,
2388
- sr_info .broadcast_id , sr_info .broadcast_name , addr_str , info -> sid );
2387
+ bt_shell_print ("Found broadcaster with ID 0x%06X (%s) and addr %s and sid 0x%02X (scanning "
2388
+ "for 0x%06X (%s))" ,
2389
+ sr_info .broadcast_id , sr_info .broadcast_name , addr_str , info -> sid ,
2390
+ auto_scan .broadcast_info .broadcast_id ,
2391
+ auto_scan .broadcast_info .broadcast_name );
2389
2392
2390
2393
if ((auto_scan .broadcast_info .broadcast_id == BT_BAP_INVALID_BROADCAST_ID ) &&
2391
2394
(strlen (auto_scan .broadcast_info .broadcast_name ) == 0U )) {
@@ -2399,11 +2402,13 @@ static void broadcast_scan_recv(const struct bt_le_scan_recv_info *info, struct
2399
2402
is_substring (auto_scan .broadcast_info .broadcast_name , sr_info .broadcast_name )) {
2400
2403
auto_scan .broadcast_info .broadcast_id = sr_info .broadcast_id ;
2401
2404
identified_broadcast = true;
2402
-
2403
- bt_shell_print ( "Found matched broadcast name '%s' with address %s" ,
2404
- sr_info . broadcast_name , addr_str ) ;
2405
+ } else {
2406
+ /* no op */
2407
+ return ;
2405
2408
}
2406
2409
2410
+ bt_shell_print ("Found matched broadcast with address %s" , addr_str );
2411
+
2407
2412
if (identified_broadcast && (auto_scan .broadcast_sink != NULL ) &&
2408
2413
(auto_scan .broadcast_sink -> pa_sync == NULL )) {
2409
2414
struct bt_le_per_adv_sync_param create_params = {0 };
0 commit comments