Commit 77f95ed4 authored by wujing's avatar wujing

fix segfault when using RC.rrc if it is RRU

parent 604dcfb4
......@@ -613,6 +613,7 @@ int main( int argc, char **argv ) {
#endif
int CC_id = 0;
int ru_id;
int node_type = ngran_eNB;
#if defined (XFORMS)
int ret;
#endif
......@@ -696,12 +697,13 @@ int main( int argc, char **argv ) {
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
}
node_type = RC.rrc[0]->node_type;
} else {
printf("RC.nb_inst = 0, Initializing L1\n");
RCconfig_L1();
}
if (RC.nb_inst > 0 && NODE_IS_CU(RC.rrc[0]->node_type)) {
if (RC.nb_inst > 0 && NODE_IS_CU(node_type)) {
protocol_ctxt_t ctxt;
ctxt.module_id = 0 ;
ctxt.instance = 0;
......@@ -711,7 +713,7 @@ int main( int argc, char **argv ) {
}
/* start threads if only L1 or not a CU */
if (RC.nb_inst == 0 || !NODE_IS_CU(RC.rrc[0]->node_type)) {
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) {
// init UE_PF_PO and mutex lock
pthread_mutex_init(&ue_pf_po_mutex, NULL);
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
......@@ -844,7 +846,7 @@ int main( int argc, char **argv ) {
LOG_I(ENB_APP,"oai_exit=%d\n",oai_exit);
// stop threads
if (RC.nb_inst == 0 || !NODE_IS_CU(RC.rrc[0]->node_type)) {
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) {
int UE_id;
#ifdef XFORMS
printf("waiting for XFORMS thread\n");
......
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