send the nassdus sooner in the rrc reconf procedure

master
Francisco Paisana 4 years ago
parent 2416e274a7
commit c6f4776a6f

@ -208,8 +208,6 @@ public:
void then(const srslte::proc_state_t& result);
private:
srslte::proc_outcome_t handle_recfg_complete();
// const
rrc* rrc_ptr;
// args

@ -990,6 +990,19 @@ srslte::proc_outcome_t rrc::connection_reconf_no_ho_proc::init(const asn1::rrc::
return proc_outcome_t::error;
}
srslte::unique_byte_buffer_t nas_sdu;
for (uint32_t i = 0; i < rx_recfg.ded_info_nas_list.size(); i++) {
nas_sdu = srslte::allocate_unique_buffer(*rrc_ptr->pool);
if (nas_sdu.get()) {
memcpy(nas_sdu->msg, rx_recfg.ded_info_nas_list[i].data(), rx_recfg.ded_info_nas_list[i].size());
nas_sdu->N_bytes = rx_recfg.ded_info_nas_list[i].size();
rrc_ptr->nas->write_pdu(RB_ID_SRB1, std::move(nas_sdu));
} else {
rrc_ptr->rrc_log->error("Fatal Error: Couldn't allocate PDU in %s.\n", __FUNCTION__);
return proc_outcome_t::error;
}
}
// Wait for PHY configurations to be complete
if (std::count(&rrc_ptr->current_scell_configured[0], &rrc_ptr->current_scell_configured[SRSLTE_MAX_CARRIERS], true) >
0) {
@ -1014,26 +1027,7 @@ srslte::proc_outcome_t rrc::connection_reconf_no_ho_proc::react(const bool& conf
return proc_outcome_t::yield;
}
return handle_recfg_complete();
}
srslte::proc_outcome_t rrc::connection_reconf_no_ho_proc::handle_recfg_complete()
{
rrc_ptr->send_rrc_con_reconfig_complete();
srslte::unique_byte_buffer_t nas_sdu;
for (uint32_t i = 0; i < rx_recfg.ded_info_nas_list.size(); i++) {
nas_sdu = srslte::allocate_unique_buffer(*rrc_ptr->pool);
if (nas_sdu.get()) {
memcpy(nas_sdu->msg, rx_recfg.ded_info_nas_list[i].data(), rx_recfg.ded_info_nas_list[i].size());
nas_sdu->N_bytes = rx_recfg.ded_info_nas_list[i].size();
rrc_ptr->nas->write_pdu(RB_ID_SRB1, std::move(nas_sdu));
} else {
rrc_ptr->rrc_log->error("Fatal Error: Couldn't allocate PDU in %s.\n", __FUNCTION__);
return proc_outcome_t::error;
}
}
return proc_outcome_t::success;
}

Loading…
Cancel
Save