Commit 22a0c25b authored by wujing's avatar wujing

avoid rlc am segfualt issue

parent cd4f8c7e
...@@ -940,7 +940,7 @@ rlc_am_rx_check_all_byte_segments( ...@@ -940,7 +940,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;
...@@ -971,6 +971,9 @@ rlc_am_rx_check_all_byte_segments( ...@@ -971,6 +971,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
...@@ -987,6 +990,9 @@ rlc_am_rx_check_all_byte_segments( ...@@ -987,6 +990,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment