do a loop in rrc::tti_clock() to process all pending events

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent 54a99d3f66
commit 40da4495ce

@ -960,11 +960,9 @@ void rrc::enable_encryption(uint16_t rnti, uint32_t lcid)
void rrc::tti_clock() void rrc::tti_clock()
{ {
// pop cmd from queue // pop cmds from queue
rrc_pdu p; rrc_pdu p;
if (not rx_pdu_queue.try_pop(&p)) { while (rx_pdu_queue.try_pop(&p)) {
return;
}
// print Rx PDU // print Rx PDU
if (p.pdu != nullptr) { if (p.pdu != nullptr) {
rrc_log->info_hex(p.pdu->msg, p.pdu->N_bytes, "Rx %s PDU", rb_id_text[p.lcid]); rrc_log->info_hex(p.pdu->msg, p.pdu->N_bytes, "Rx %s PDU", rb_id_text[p.lcid]);
@ -974,7 +972,7 @@ void rrc::tti_clock()
auto user_it = users.find(p.rnti); auto user_it = users.find(p.rnti);
if (user_it == users.end()) { if (user_it == users.end()) {
rrc_log->warning("Discarding PDU for removed rnti=0x%x\n", p.rnti); rrc_log->warning("Discarding PDU for removed rnti=0x%x\n", p.rnti);
return; continue;
} }
// handle queue cmd // handle queue cmd
@ -1005,6 +1003,7 @@ void rrc::tti_clock()
rrc_log->error("Rx PDU with invalid bearer id: %d", p.lcid); rrc_log->error("Rx PDU with invalid bearer id: %d", p.lcid);
break; break;
} }
}
} }
/******************************************************************************* /*******************************************************************************

Loading…
Cancel
Save