Commit f021b8b5 authored by Robert Schmidt's avatar Robert Schmidt

Bugfix: only fill DU system information if SA

In NSA, we don't have SIB1. However, the DU system information requires
both MIB and SIB1, but is itself optional. So, in NSA, don't fill the DU
system information.
parent 0869aae7
...@@ -1153,6 +1153,10 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id, ...@@ -1153,6 +1153,10 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
req->cell[0].info.measurement_timing_information = "0"; req->cell[0].info.measurement_timing_information = "0";
if (get_softmodem_params()->sa) {
// in NSA we don't transmit SIB1, so cannot fill DU system information
// so cannot send MIB either
int buf_len = 3; // this is what we assume in monolithic int buf_len = 3; // this is what we assume in monolithic
req->cell[0].sys_info = calloc(1, sizeof(*req->cell[0].sys_info)); req->cell[0].sys_info = calloc(1, sizeof(*req->cell[0].sys_info));
AssertFatal(req->cell[0].sys_info != NULL, "out of memory\n"); AssertFatal(req->cell[0].sys_info != NULL, "out of memory\n");
...@@ -1163,8 +1167,6 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id, ...@@ -1163,8 +1167,6 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len); sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len);
DevAssert(sys_info->mib_length == buf_len); DevAssert(sys_info->mib_length == buf_len);
if (get_softmodem_params()->sa) {
// in NSA we don't transmit SIB1
DevAssert(sib1 != NULL); DevAssert(sib1 != NULL);
NR_SIB1_t *bcch_SIB1 = sib1->message.choice.c1->choice.systemInformationBlockType1; NR_SIB1_t *bcch_SIB1 = sib1->message.choice.c1->choice.systemInformationBlockType1;
sys_info->sib1 = calloc(NR_MAX_SIB_LENGTH / 8, sizeof(*sys_info->sib1)); sys_info->sib1 = calloc(NR_MAX_SIB_LENGTH / 8, sizeof(*sys_info->sib1));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment