another tentative fix for gnb initialization crashes

This commit is contained in:
francescomani
2021-03-18 13:09:36 +01:00
parent d30b8c69ae
commit a1f1d53cb5
6 changed files with 6 additions and 13 deletions
+2 -7
View File
@@ -468,21 +468,16 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
if (RC.gNB == NULL) {
RC.gNB = (PHY_VARS_gNB **) malloc((1+RC.nb_nr_L1_inst)*sizeof(PHY_VARS_gNB *));
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB));
memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB));
}
LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB);
}
LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB);
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
if (RC.gNB[inst] == NULL) {
RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB));
memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB));
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]);
}
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]);
gNB = RC.gNB[inst];
gNB->abstraction_flag = 0;
gNB->single_thread_flag = single_thread_flag;
+2 -2
View File
@@ -809,10 +809,10 @@ if(!IS_SOFTMODEM_NOS1)
if (RC.nb_nr_inst > 0) {
// don't create if node doesn't connect to RRC/S1/GTP
RCconfig_NR_L1();
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
} else {
printf("No ITTI, Initializing L1\n");
RCconfig_NR_L1();
AssertFatal(1==0,"RC.nb_nr_inst should have been already initialized in get_options()");
}
/* Start the agent. If it is turned off in the configuration, it won't start */