Skip to content
Snippets Groups Projects
Commit 4d66dba0 authored by Wu Jing's avatar Wu Jing
Browse files

avoid segfault in RLC

parent 21d13ef4
No related branches found
No related tags found
5 merge requests!650Release v1.1.0 Candidate,!649Develop: Integration 2019 Week 30,!642Develop: Integration 2019 Mid-Week 29,!630nfapi interface bug fix,!588Develop nr merge
...@@ -938,7 +938,7 @@ rlc_am_rx_check_all_byte_segments( ...@@ -938,7 +938,7 @@ rlc_am_rx_check_all_byte_segments(
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info; rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
mem_block_t *cursor_p = NULL; mem_block_t *cursor_p = NULL;
mem_block_t *first_cursor_p = NULL; mem_block_t *first_cursor_p = NULL;
rlc_sn_t sn = pdu_info_p->sn; rlc_usn_t sn = pdu_info_p->sn;
sdu_size_t next_waited_so; sdu_size_t next_waited_so;
sdu_size_t last_end_so; sdu_size_t last_end_so;
...@@ -969,6 +969,9 @@ rlc_am_rx_check_all_byte_segments( ...@@ -969,6 +969,9 @@ rlc_am_rx_check_all_byte_segments(
// the so field of the first PDU should be 0 // the so field of the first PDU should be 0
//cursor_p = list.head; //cursor_p = list.head;
//we start from the first stored PDU segment of this SN //we start from the first stored PDU segment of this SN
if(cursor_p->data == NULL){
return;
}
pdu_info_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info; pdu_info_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
// if the first segment does not have SO = 0 then no need to continue // if the first segment does not have SO = 0 then no need to continue
...@@ -985,6 +988,9 @@ rlc_am_rx_check_all_byte_segments( ...@@ -985,6 +988,9 @@ rlc_am_rx_check_all_byte_segments(
while (cursor_p->next != NULL) { while (cursor_p->next != NULL) {
//msg("rlc_am_rx_check_all_byte_segments(%d) @4\n",sn); //msg("rlc_am_rx_check_all_byte_segments(%d) @4\n",sn);
cursor_p = cursor_p->next; cursor_p = cursor_p->next;
if(cursor_p->data == NULL){
return;
}
pdu_info_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info; pdu_info_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
if (pdu_info_p->sn == sn) { if (pdu_info_p->sn == sn) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment