createDRBlist(): return NULL if no active DRB

If there are no active bearers, the function previously returned an
empty list. Return NULL if there are no bearers, so it is safe to call
this function even when no bearers are present. We can also pass it
every time to do_RRCReconfiguration(), which will not add an empty list
for DRBs.
This commit is contained in:
Robert Schmidt
2024-02-03 11:28:43 +01:00
parent 34b5e592f0
commit 4b3b6b1e5e
+4
View File
@@ -429,6 +429,10 @@ static NR_DRB_ToAddModList_t *createDRBlist(gNB_RRC_UE_t *ue, bool reestablish)
asn1cSeqAdd(&DRB_configList->list, DRB_config);
}
}
if (DRB_configList->list.count == 0) {
free(DRB_configList);
return NULL;
}
return DRB_configList;
}