From 963dff34af8e15944ff82952c8a06ce2a9780033 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 16 Feb 2021 11:53:55 +0000 Subject: [PATCH] Added retransmissions to the UE's PDCP on re-establishment. --- lib/src/upper/pdcp_entity_lte.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/upper/pdcp_entity_lte.cc b/lib/src/upper/pdcp_entity_lte.cc index 205911537..0c18e4b9f 100644 --- a/lib/src/upper/pdcp_entity_lte.cc +++ b/lib/src/upper/pdcp_entity_lte.cc @@ -84,6 +84,13 @@ void pdcp_entity_lte::reestablish() } else { // Send status report if required on reestablishment in RLC AM send_status_report(); + // Re-transmit unacknwoledged SDUs + std::map undelivered_sdus = std::move(undelivered_sdus_queue); + undelivered_sdus_queue.clear(); + for (std::map::iterator it = undelivered_sdus.begin(); it != undelivered_sdus.end(); + ++it) { + write_sdu(std::move(it->second), it->first); + } } } @@ -119,7 +126,7 @@ void pdcp_entity_lte::write_sdu(unique_byte_buffer_t sdu, int upper_sn) // PDUs will be removed from the queue, either when the lower layers will report // a succesfull transmission or when the discard timer expires. // Status report will also use this queue, to know the First Missing SDU (FMS). - if (!rlc->rb_is_um(lcid)) { + if (is_drb() && !rlc->rb_is_um(lcid)) { store_sdu(used_sn, sdu); }