From 65040130778c89b2cc0a13c0b64175416d4cf591 Mon Sep 17 00:00:00 2001 From: fnabet Date: Sat, 4 Mar 2017 15:19:58 +0100 Subject: [PATCH] RLC AM : fix update of vrMS in tReordering expiry --- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c index a824c13d15..cec0dffd1d 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c @@ -93,9 +93,12 @@ rlc_am_check_timer_reordering( } /* Now find a SN for which either no PDU is received or partially received */ - while ((cursor != NULL) && (pdu_info->sn == vr_ms_new) && (((rlc_am_rx_pdu_management_t*)(cursor->data))->all_segments_received > 0)) { + while ((cursor != NULL) && (vr_ms_new != rlc_pP->vr_h) && (pdu_info->sn == vr_ms_new) && (((rlc_am_rx_pdu_management_t*)(cursor->data))->all_segments_received > 0)) { + /* Increment vrMS if the PDU is fully received or if this is the last PDU segment */ + if ((pdu_info->rf == 0) || (pdu_info->lsf == 1)) { + vr_ms_new = RLC_AM_NEXT_SN(vr_ms_new); + } cursor = cursor->next; - vr_ms_new = RLC_AM_NEXT_SN(vr_ms_new); if (cursor != NULL) { pdu_info = &((rlc_am_rx_pdu_management_t*)(cursor->data))->pdu_info; }