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 c399fb8447c96396c8678f46f4ec0cc16c5d80f3..7d193bcd01aee1ee71ead8d1b6668c1faa7676ff 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c @@ -134,8 +134,11 @@ rlc_am_get_status_pdu_buffer_occupancy( } // end if segments else { - /* Go to next received PDU or PDU Segment */ - cursor_p = cursor_p->next; + /* Go to next received PDU or PDU segment with different SN */ + do + { + cursor_p = cursor_p->next; + } while ((cursor_p != NULL) && (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info.sn == sn_cursor)); } sn_prev = RLC_AM_NEXT_SN(sn_cursor); diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c index c66b826fd69dadaff9d61fa2269301c705894871..048466a1a99a893982ef52e39029ae7456360f5c 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c @@ -638,7 +638,6 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu( mem_block_t* trunc_pdu = create_new_segment_from_pdu(tb_pP,next_waited_so,pdu_rx_info_p->payload_size - next_waited_so); if (trunc_pdu != NULL) { - ((rlc_am_rx_pdu_management_t *) (trunc_pdu->data))->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING; /* Insert PDU Segment */ list2_insert_after_element(trunc_pdu, previous_cursor_p, &rlc_pP->receiver_buffer); @@ -1317,7 +1316,9 @@ rlc_am_rx_list_reassemble_rlc_sdus( } /* Reset Management pointers */ - if (cursor_p != NULL) { + if ((cursor_p != NULL) && + ((((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info.sn == RLC_AM_NEXT_SN(sn)) || + (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING))) { rlc_am_rx_pdu_management_p = ((rlc_am_rx_pdu_management_t*)(cursor_p->data)); } else { diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c index 0d01d0b1ce9897290fbc12993be35036af9b61db..3a00946160b63f598a5db3d76c84f3b051bd7db7 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c @@ -723,8 +723,10 @@ rlc_am_send_status_pdu( } } // end while on all PDU segments of sn_cursor else { - /* Go to next received PDU or PDU segment if sn_cursor is fully received */ - cursor_p = cursor_p->next; + /* Go to next received PDU or PDU segment with different SN */ + do { + cursor_p = cursor_p->next; + } while ((cursor_p != NULL) && (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info.sn == sn_cursor)); } /* Increment sn_nack except if sn_nack = vrMS and if current SN was not fully received */