disable blocking queue in enb::mac when mac::stop() is called. Ignore PRACHs after stop() is called

master
Francisco 4 years ago committed by Francisco Paisana
parent d135ae4d29
commit d571d26b0a

@ -89,6 +89,8 @@ void mac::stop()
{
srsran::rwlock_write_guard lock(rwlock);
if (started) {
started = false;
ue_db.clear();
for (auto& cc : common_buffers) {
for (int i = 0; i < NOF_BCCH_DLSCH_MSG; i++) {
@ -96,8 +98,8 @@ void mac::stop()
}
srsran_softbuffer_tx_free(&cc.pcch_softbuffer_tx);
srsran_softbuffer_tx_free(&cc.rar_softbuffer_tx);
started = false;
}
ue_pool.stop();
}
}
@ -454,6 +456,10 @@ uint16_t mac::allocate_ue()
// Add UE to map
{
srsran::rwlock_write_guard lock(rwlock);
if (not started) {
logger.info("RACH ignored as eNB is being shutdown");
return SRSRAN_INVALID_RNTI;
}
if (ue_db.size() >= args.max_nof_ues) {
logger.warning("Maximum number of connected UEs %zd connected to the eNB. Ignoring PRACH", max_ues);
return SRSRAN_INVALID_RNTI;

Loading…
Cancel
Save