From 21f8698397b2e738c800d492ca90268bb51673e2 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 15 Jul 2019 22:20:10 +0200 Subject: [PATCH] fix MAC PDU packing for large TB sizes update the byte_buffer length variable after updating the remaining PDU length. This has caused an error when calculating the remaing space in the PDU because the SDU length was counted twice. --- lib/src/common/pdu.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/common/pdu.cc b/lib/src/common/pdu.cc index ce76827fb..04782a817 100644 --- a/lib/src/common/pdu.cc +++ b/lib/src/common/pdu.cc @@ -660,8 +660,9 @@ int sch_subh::set_sdu(uint32_t lcid_, uint32_t requested_bytes_, read_pdu_interf } } - ((sch_pdu*)parent)->add_sdu(nof_bytes); ((sch_pdu*)parent)->update_space_sdu(nof_bytes); + ((sch_pdu*)parent)->add_sdu(nof_bytes); + return nof_bytes; } else { return SRSLTE_ERROR;