Commit 33973121 authored by Xue Song's avatar Xue Song

Remove duplicate code

In the UE executable, delete the initialization of NR.nrrrc and check the NULL of NR.nrrrc
parent 986515ea
...@@ -377,31 +377,6 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -377,31 +377,6 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==1)){
if (gnb_nb > 0) {
if(NGAP_CONF_MODE){
if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) {
LOG_E(NGAP, "Create task for NGAP failed\n");
return -1;
}
} else {
LOG_E(NGAP, "Ngap task not created\n");
}
if(!emulate_rf){
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
LOG_E(UDP_, "Create task for UDP failed\n");
return -1;
}
}
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
}
}
}
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n"); LOG_E(GNB_APP, "Create task for gNB APP failed\n");
......
...@@ -452,10 +452,6 @@ int main( int argc, char **argv ) { ...@@ -452,10 +452,6 @@ int main( int argc, char **argv ) {
#endif #endif
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
RC.nrrrc = (gNB_RRC_INST **)malloc(1*sizeof(gNB_RRC_INST *));
RC.nrrrc[0] = (gNB_RRC_INST*)malloc(sizeof(gNB_RRC_INST));
RC.nrrrc[0]->node_type = ngran_gNB;
init_NR_UE(1,rrc_config_path); init_NR_UE(1,rrc_config_path);
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa)
init_pdcp(); init_pdcp();
......
...@@ -607,7 +607,7 @@ srb_found: ...@@ -607,7 +607,7 @@ srb_found:
LOG_D(PDCP, "%s(): (srb %d) calling rlc_data_req size %d\n", __func__, srb_id, size); LOG_D(PDCP, "%s(): (srb %d) calling rlc_data_req size %d\n", __func__, srb_id, size);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]); //for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
//printf("\n"); //printf("\n");
if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) { if ((RC.nrrrc == NULL) || (!NODE_IS_CU(RC.nrrrc[0]->node_type))) {
ctxt.module_id = 0; ctxt.module_id = 0;
ctxt.enb_flag = 1; ctxt.enb_flag = 1;
ctxt.instance = 0; ctxt.instance = 0;
......
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