fix timers interface to avoid accessing to a timer after its release. fix gtpu tunnel activation during s1 handover

master
Francisco 4 years ago committed by Francisco Paisana
parent 023cb0fdde
commit a72a659fdf

@ -180,8 +180,6 @@ public:
void stop() { impl()->stop(); } void stop() { impl()->stop(); }
void clear() { impl()->clear(); }
void release() void release()
{ {
impl()->clear(); impl()->clear();

@ -742,6 +742,7 @@ void rrc::ue::rrc_mobility::handle_ho_requested(idle_st& s, const ho_req_rx_ev&
// Set admitted E-RABs // Set admitted E-RABs
std::vector<asn1::s1ap::erab_admitted_item_s> admitted_erabs; std::vector<asn1::s1ap::erab_admitted_item_s> admitted_erabs;
auto& fwd_tunnels = get_state<s1_target_ho_st>()->pending_tunnels; auto& fwd_tunnels = get_state<s1_target_ho_st>()->pending_tunnels;
fwd_tunnels.clear();
for (auto& erab : rrc_ue->bearer_list.get_erabs()) { for (auto& erab : rrc_ue->bearer_list.get_erabs()) {
admitted_erabs.emplace_back(); admitted_erabs.emplace_back();
asn1::s1ap::erab_admitted_item_s& admitted_erab = admitted_erabs.back(); asn1::s1ap::erab_admitted_item_s& admitted_erab = admitted_erabs.back();
@ -907,8 +908,8 @@ void rrc::ue::rrc_mobility::handle_status_transfer(s1_target_ho_st& s, const sta
} }
// Enable forwarding of GTPU SDUs to PDCP // Enable forwarding of GTPU SDUs to PDCP
for (uint32_t teid : s.pending_tunnels) { for (auto& erab : rrc_ue->bearer_list.get_erabs()) {
rrc_enb->gtpu->set_tunnel_status(teid, true); rrc_enb->gtpu->set_tunnel_status(erab.second.teid_in, true);
} }
// Check if there is any pending Reconfiguration Complete. If there is, self-trigger // Check if there is any pending Reconfiguration Complete. If there is, self-trigger

@ -191,6 +191,10 @@ void gtpu::set_tunnel_status(uint32_t teidin, bool dl_active)
} }
tun_it->second.dl_enabled = dl_active; tun_it->second.dl_enabled = dl_active;
if (dl_active) { if (dl_active) {
logger.info("Activing GTPU tunnel rnti=0x%x,TEID=%d. %d SDUs currently buffered",
tun_it->second.rnti,
teidin,
tun_it->second.buffer.size());
for (auto& sdu_it : tun_it->second.buffer) { for (auto& sdu_it : tun_it->second.buffer) {
pdcp->write_sdu(tun_it->second.rnti, pdcp->write_sdu(tun_it->second.rnti,
tun_it->second.lcid, tun_it->second.lcid,

@ -335,7 +335,7 @@ void rrc::rrc_meas::var_meas_report_list::generate_report_eutra(meas_results_s*
} }
} else { } else {
if (var_meas.periodic_timer.is_valid()) { if (var_meas.periodic_timer.is_valid()) {
var_meas.periodic_timer.clear(); var_meas.periodic_timer.stop();
} }
// else if the triggerType is set to periodical: // else if the triggerType is set to periodical:
if (var_meas.report_cfg_eutra.trigger_type.type().value == report_cfg_eutra_s::trigger_type_c_::types::periodical) { if (var_meas.report_cfg_eutra.trigger_type.type().value == report_cfg_eutra_s::trigger_type_c_::types::periodical) {
@ -415,7 +415,7 @@ void rrc::rrc_meas::var_meas_report_list::generate_report_interrat(meas_results_
} }
} else { } else {
if (var_meas.periodic_timer.is_valid()) { if (var_meas.periodic_timer.is_valid()) {
var_meas.periodic_timer.clear(); var_meas.periodic_timer.stop();
} }
// else if the triggerType is set to periodical: // else if the triggerType is set to periodical:
if (var_meas.report_cfg_inter.trigger_type.type().value == if (var_meas.report_cfg_inter.trigger_type.type().value ==

Loading…
Cancel
Save