Return a pointer to a new RRC instance (gNB_RRC_INST) from RCconfig_NRRRC
This commit is contained in:
@@ -256,8 +256,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
|
||||
|
||||
LOG_D(GNB_APP, "Allocating gNB_RRC_INST\n");
|
||||
RC.nrrrc = calloc(1, sizeof(*RC.nrrrc));
|
||||
RC.nrrrc[0] = calloc(1, sizeof(gNB_RRC_INST));
|
||||
RCconfig_NRRRC(RC.nrrrc[0]);
|
||||
RC.nrrrc[0] = RCconfig_NRRRC();
|
||||
|
||||
if (!get_softmodem_params()->nsa && !(node_type == ngran_gNB_DU)) {
|
||||
// we start pdcp in both cuup (for drb) and cucp (for srb)
|
||||
|
||||
@@ -1773,8 +1773,14 @@ static void fill_measurement_configuration(uint8_t gnb_idx, gNB_RRC_INST *rrc)
|
||||
}
|
||||
}
|
||||
|
||||
void RCconfig_NRRRC(gNB_RRC_INST *rrc)
|
||||
/**
|
||||
* @brief Allocates and initializes RRC instances
|
||||
* Currently assuming 1 instance
|
||||
*/
|
||||
gNB_RRC_INST *RCconfig_NRRRC()
|
||||
{
|
||||
// Allocate memory for 1 RRC instance
|
||||
gNB_RRC_INST *rrc = calloc(1, sizeof(*rrc));
|
||||
|
||||
int num_gnbs = 0;
|
||||
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
|
||||
@@ -1914,7 +1920,9 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc)
|
||||
}//End if (num_gnbs>0)
|
||||
|
||||
config_security(rrc);
|
||||
}//End RCconfig_NRRRC function
|
||||
|
||||
return rrc;
|
||||
}
|
||||
|
||||
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ extern void NRRCConfig(void);
|
||||
//void enb_config_display(void);
|
||||
//void ru_config_display(void);
|
||||
|
||||
void RCconfig_NRRRC(gNB_RRC_INST *rrc);
|
||||
gNB_RRC_INST *RCconfig_NRRRC();
|
||||
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
|
||||
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
|
||||
void wait_f1_setup_response(void);
|
||||
|
||||
@@ -219,7 +219,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc)
|
||||
AssertFatal(NODE_IS_MONOLITHIC(rrc->node_type), "phy_test and do_ra only work in monolithic\n");
|
||||
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_allocate_new_ue_context(rrc);
|
||||
LOG_I(NR_RRC,"Adding new user (%p)\n",ue_context_p);
|
||||
if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
if (!NODE_IS_CU(rrc->node_type)) {
|
||||
rrc_add_nsa_user(rrc,ue_context_p,NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user