From 60feab3d7b311802008ba89dcf069a44ad637020 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 26 Nov 2019 18:07:38 +0000 Subject: [PATCH] Added map to keep discardTimers in PDCP NR entity. --- lib/include/srslte/upper/pdcp_entity_nr.h | 1 + lib/src/upper/pdcp_entity_nr.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/include/srslte/upper/pdcp_entity_nr.h b/lib/include/srslte/upper/pdcp_entity_nr.h index 872080f58..0a41834d7 100644 --- a/lib/include/srslte/upper/pdcp_entity_nr.h +++ b/lib/include/srslte/upper/pdcp_entity_nr.h @@ -101,6 +101,7 @@ private: // Discard callback (discardTimer) class discard_callback; + std::map discard_timers_map; // COUNT overflow protection bool tx_overflow = false; diff --git a/lib/src/upper/pdcp_entity_nr.cc b/lib/src/upper/pdcp_entity_nr.cc index 72268d42d..c242025a3 100644 --- a/lib/src/upper/pdcp_entity_nr.cc +++ b/lib/src/upper/pdcp_entity_nr.cc @@ -109,6 +109,7 @@ void pdcp_entity_nr::write_sdu(unique_byte_buffer_t sdu, bool blocking) discard_callback discard_fnc(this, tx_next); discard_timer.set(static_cast(cfg.discard_timer), discard_fnc); discard_timer.run(); + discard_timers_map.insert(std::make_pair(tx_next, std::move(discard_timer))); log->debug("Discard Timer set for SN %" PRIu32 ". Timeout: %" PRIu32 "ms\n", tx_next, static_cast(cfg.discard_timer));