bugfix: avoid segmentation fault when Redcap tries to connect to gNB as NR_ServingCellConfig_t scd is NULL when Redcap does RA

This commit is contained in:
Marius Tillner
2025-07-22 15:51:01 +02:00
parent fc1c762cf2
commit 693dfb9374
+2 -1
View File
@@ -3503,7 +3503,8 @@ static bool verify_radio_configuration(int uid, const NR_ServingCellConfigCommon
return false;
}
int n_dl_bwp = scd->downlinkBWP_ToAddModList ? scd->downlinkBWP_ToAddModList->list.count : 1;
/* for RedCap, scd is NULL */
int n_dl_bwp = scd && scd->downlinkBWP_ToAddModList ? scd->downlinkBWP_ToAddModList->list.count : 1;
int csi_offset = fs->numb_slots_period * n_dl_bwp;
// see set_csirs_periodicity
if (csi_offset / 320 >= get_full_dl_slots_per_period(fs)) {