|
|
|
@ -457,12 +457,15 @@ bool rrc_nr::apply_rlc_add_mod(const rlc_bearer_cfg_s& rlc_bearer_cfg)
|
|
|
|
|
uint32_t drb_id = 0;
|
|
|
|
|
uint32_t srb_id = 0;
|
|
|
|
|
rlc_config_t rlc_cfg;
|
|
|
|
|
// We change this to RLC_RB_IS_DRB if below we detect it's a DRB
|
|
|
|
|
rlc_rb_type_t rb_type = RLC_RB_IS_SRB;
|
|
|
|
|
|
|
|
|
|
lc_ch_id = rlc_bearer_cfg.lc_ch_id;
|
|
|
|
|
if (rlc_bearer_cfg.served_radio_bearer_present == true) {
|
|
|
|
|
if (rlc_bearer_cfg.served_radio_bearer.type() == rlc_bearer_cfg_s::served_radio_bearer_c_::types::drb_id) {
|
|
|
|
|
drb_id = rlc_bearer_cfg.served_radio_bearer.drb_id();
|
|
|
|
|
add_lcid_drb(lc_ch_id, drb_id);
|
|
|
|
|
rb_type = RLC_RB_IS_DRB;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
logger.error("In RLC bearer cfg does not contain served radio bearer");
|
|
|
|
@ -470,7 +473,8 @@ bool rrc_nr::apply_rlc_add_mod(const rlc_bearer_cfg_s& rlc_bearer_cfg)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (rlc_bearer_cfg.rlc_cfg_present == true) {
|
|
|
|
|
if (srsran::make_rlc_config_t(rlc_bearer_cfg.rlc_cfg, &rlc_cfg) != SRSRAN_SUCCESS) {
|
|
|
|
|
uint8_t bearer_id = static_cast<uint8_t>(rb_type == RLC_RB_IS_SRB ? srb_id : drb_id);
|
|
|
|
|
if (srsran::make_rlc_config_t(rlc_bearer_cfg.rlc_cfg, bearer_id, rb_type, &rlc_cfg) != SRSRAN_SUCCESS) {
|
|
|
|
|
logger.error("Failed to build RLC config");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|