add stop_timers function to RRC and call it in rrc::stop()

- this solves an issue with shutting down RRC when the UE
  just sent a connection request (and activated timer T300)
  and stop was called.
This commit is contained in:
Andre Puschmann 2018-11-30 15:04:53 +01:00
parent 2bc4d70199
commit d7ab2b8d66
2 changed files with 11 additions and 8 deletions

View File

@ -623,6 +623,7 @@ private:
void rrc_connection_release();
void radio_link_failure();
void leave_connected();
void stop_timers();
void apply_rr_config_common_dl(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *config);
void apply_rr_config_common_ul(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *config);

View File

@ -219,6 +219,7 @@ void rrc::init(phy_interface_rrc *phy_,
void rrc::stop() {
running = false;
stop_timers();
cmd_msg_t msg;
msg.command = cmd_msg_t::STOP;
cmd_q.push(msg);
@ -1655,10 +1656,7 @@ void rrc::leave_connected()
mac->reset();
set_phy_default();
set_mac_default();
mac_timers->timer_get(t301)->stop();
mac_timers->timer_get(t310)->stop();
mac_timers->timer_get(t311)->stop();
mac_timers->timer_get(t304)->stop();
stop_timers();
rrc_log->info("Going RRC_IDLE\n");
if (phy->cell_is_camping()) {
// Receive paging
@ -1668,10 +1666,14 @@ void rrc::leave_connected()
}
}
void rrc::stop_timers()
{
mac_timers->timer_get(t300)->stop();
mac_timers->timer_get(t301)->stop();
mac_timers->timer_get(t310)->stop();
mac_timers->timer_get(t311)->stop();
mac_timers->timer_get(t304)->stop();
}
/*******************************************************************************
*