@@ -1127,16 +1127,19 @@ bool test_mac_mlme_beacon_notify()
1127
1127
memset (& setup , 0 , sizeof (protocol_interface_rf_mac_setup_s ));
1128
1128
setup .tun_extension_rf_driver = NULL ;
1129
1129
mlme_beacon_ind_t data ;
1130
+ memset (& data , 0 , sizeof (mlme_beacon_ind_t ));
1130
1131
mac_api_t api ;
1132
+ memset (& api , 0 , sizeof (mac_api_t ));
1131
1133
api .mlme_ind_cb = & mlme_ind_callback ;
1132
1134
sw_mac_stub .mac_api_ptr = & api ;
1133
1135
mlme_scan_conf_t conf ;
1136
+ memset (& conf , 0 , sizeof (mlme_scan_conf_t ));
1134
1137
setup .mac_mlme_scan_resp = & conf ;
1135
1138
1136
1139
//Test add_or_update_beacon here completely -->
1137
1140
mlme_pan_descriptor_t desc1 ;
1141
+ memset (& desc1 , 0 , sizeof (mlme_pan_descriptor_t ));
1138
1142
conf .PAN_values [0 ] = & desc1 ;
1139
- conf .PAN_values [1 ] = NULL ;
1140
1143
conf .ResultListSize = 2 ;
1141
1144
desc1 .LogicalChannel = 11 ;
1142
1145
data .PANDescriptor .LogicalChannel = 11 ;
@@ -1147,11 +1150,13 @@ bool test_mac_mlme_beacon_notify()
1147
1150
// Beacon data length doesn't contain FHSS synch info on single channel
1148
1151
data .beacon_data_length = FHSS_SYNCH_INFO_START ;
1149
1152
1153
+ nsdynmemlib_stub .returnCounter = 0 ;
1150
1154
//for loop covered here
1151
1155
if (0 != mac_mlme_beacon_notify (& setup , & data )){
1152
1156
return false;
1153
1157
}
1154
1158
1159
+ //Add First
1155
1160
conf .PAN_values [0 ] = NULL ;
1156
1161
if (0 != mac_mlme_beacon_notify (& setup , & data )){
1157
1162
return false;
@@ -1170,6 +1175,8 @@ bool test_mac_mlme_beacon_notify()
1170
1175
}
1171
1176
1172
1177
ns_dyn_mem_free (conf .PAN_values [2 ]);
1178
+ conf .PAN_values [2 ] = NULL ;
1179
+ conf .ResultListSize = 2 ;
1173
1180
1174
1181
// FHSS TESTS START
1175
1182
setup .fhss_api = ns_fhss_create (0 , 0 );
0 commit comments