mirror of https://github.com/PentHertz/srsLTE.git
fix uninitialized vars in RRC
This commit is contained in:
parent
d5835fc8a0
commit
82e3fd1052
|
@ -382,7 +382,7 @@ private:
|
||||||
|
|
||||||
srslte::bit_buffer_t bit_buf;
|
srslte::bit_buffer_t bit_buf;
|
||||||
|
|
||||||
rrc_state_t state, last_state = RRC_STATE_IDLE;
|
rrc_state_t state = RRC_STATE_IDLE, last_state = RRC_STATE_IDLE;
|
||||||
uint8_t transaction_id = 0;
|
uint8_t transaction_id = 0;
|
||||||
srslte::s_tmsi_t ue_identity;
|
srslte::s_tmsi_t ue_identity;
|
||||||
bool ue_identity_configured = false;
|
bool ue_identity_configured = false;
|
||||||
|
@ -413,9 +413,9 @@ private:
|
||||||
|
|
||||||
// RRC constants and timers
|
// RRC constants and timers
|
||||||
srslte::timers* timers = nullptr;
|
srslte::timers* timers = nullptr;
|
||||||
uint32_t n310_cnt, N310 = 0;
|
uint32_t n310_cnt = 0, N310 = 0;
|
||||||
uint32_t n311_cnt, N311 = 0;
|
uint32_t n311_cnt = 0, N311 = 0;
|
||||||
uint32_t t300, t301, t302, t310, t311, t304 = 0;
|
uint32_t t300 = 0, t301 = 0, t302 = 0, t310 = 0, t311 = 0, t304 = 0;
|
||||||
|
|
||||||
// Radio bearers
|
// Radio bearers
|
||||||
typedef enum{
|
typedef enum{
|
||||||
|
|
|
@ -415,29 +415,29 @@ void rrc::process_new_phy_meas(phy_meas_t meas)
|
||||||
// Detection of physical layer problems in RRC_CONNECTED (5.3.11.1)
|
// Detection of physical layer problems in RRC_CONNECTED (5.3.11.1)
|
||||||
void rrc::out_of_sync()
|
void rrc::out_of_sync()
|
||||||
{
|
{
|
||||||
|
|
||||||
// CAUTION: We do not lock in this function since they are called from real-time threads
|
// CAUTION: We do not lock in this function since they are called from real-time threads
|
||||||
|
if (serving_cell && timers && rrc_log) {
|
||||||
|
serving_cell->in_sync = false;
|
||||||
|
|
||||||
serving_cell->in_sync = false;
|
// upon receiving N310 consecutive "out-of-sync" indications for the PCell from lower layers while neither T300,
|
||||||
|
// T301, T304 nor T311 is running:
|
||||||
// upon receiving N310 consecutive "out-of-sync" indications for the PCell from lower layers while neither T300,
|
if (state == RRC_STATE_CONNECTED) {
|
||||||
// T301, T304 nor T311 is running:
|
if (!timers->get(t300)->is_running() && !timers->get(t301)->is_running() && !timers->get(t304)->is_running() &&
|
||||||
if (state == RRC_STATE_CONNECTED) {
|
!timers->get(t310)->is_running() && !timers->get(t311)->is_running()) {
|
||||||
if (!timers->get(t300)->is_running() && !timers->get(t301)->is_running() && !timers->get(t304)->is_running() &&
|
rrc_log->info("Received out-of-sync while in state %s. n310=%d, t311=%s, t310=%s\n",
|
||||||
!timers->get(t310)->is_running() && !timers->get(t311)->is_running()) {
|
rrc_state_text[state],
|
||||||
rrc_log->info("Received out-of-sync while in state %s. n310=%d, t311=%s, t310=%s\n",
|
n310_cnt,
|
||||||
rrc_state_text[state],
|
timers->get(t311)->is_running() ? "running" : "stop",
|
||||||
n310_cnt,
|
timers->get(t310)->is_running() ? "running" : "stop");
|
||||||
timers->get(t311)->is_running() ? "running" : "stop",
|
n310_cnt++;
|
||||||
timers->get(t310)->is_running() ? "running" : "stop");
|
if (n310_cnt == N310) {
|
||||||
n310_cnt++;
|
rrc_log->info("Detected %d out-of-sync from PHY. Trying to resync. Starting T310 timer %d ms\n",
|
||||||
if (n310_cnt == N310) {
|
N310,
|
||||||
rrc_log->info("Detected %d out-of-sync from PHY. Trying to resync. Starting T310 timer %d ms\n",
|
timers->get(t310)->get_timeout());
|
||||||
N310,
|
timers->get(t310)->reset();
|
||||||
timers->get(t310)->get_timeout());
|
timers->get(t310)->run();
|
||||||
timers->get(t310)->reset();
|
n310_cnt = 0;
|
||||||
timers->get(t310)->run();
|
}
|
||||||
n310_cnt = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue