avoid segfault in RLC
This commit is contained in:
@@ -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(
|
|||||||
// 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(
|
|||||||
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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user