From 833714406c84cde6308155696328093fc8bdac91 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Wed, 20 Jul 2016 17:54:21 +0200
Subject: [PATCH] hotfix: RLC AM reported wrong number of bytes to retransmit

This was causing oaisim to fail way too often at the startup
of a connection.

Things should go better with this patch.

It may not be the end of the story, the use of retrans_num_bytes_to_retransmit
is not clear to me. The problem I see is: what if the max number of
retransimission has been reached (if that has a meaning at all in RLC AM)?
will this value be decreased or not?
---
 openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
index 0b8abf38383..fd8279579d0 100755
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
@@ -103,7 +103,7 @@ rlc_am_get_buffer_occupancy_in_bytes (
   }
 
 #endif
-  return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
+  return rlc_pP->status_buffer_occupancy + rlc_pP->retrans_num_bytes_to_retransmit + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
 }
 //-----------------------------------------------------------------------------
 void
-- 
GitLab