Commit c0162d06 authored by wujing's avatar wujing Committed by masayuki.harada

add mutex for input_sdus in rlc to try to avoid segfault

parent 5c65094e
......@@ -527,7 +527,7 @@ rlc_am_mac_status_indication (
status_resp.buffer_occupancy_in_bytes += (header_overhead + max_li_overhead);
}
RLC_AM_MUTEX_LOCK(&rlc->lock_input_sdus, ctxt_pP, rlc);
if ((rlc->input_sdus[rlc->current_sdu_index].mem_block != NULL) && (status_resp.buffer_occupancy_in_bytes)) {
//status_resp.buffer_occupancy_in_bytes += ((rlc_am_entity_t *) rlc)->tx_header_min_length_in_bytes;
status_resp.buffer_occupancy_in_pdus = rlc->nb_sdu;
......@@ -553,7 +553,7 @@ rlc_am_mac_status_indication (
status_resp.head_sdu_is_segmented = 1;
}
}
RLC_AM_MUTEX_UNLOCK(&rlc->lock_input_sdus);
if (MESSAGE_CHART_GENERATOR) {
MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
......
......@@ -388,7 +388,7 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_p);
rlc_p->nb_bytes_requested_by_mac = tbs_sizeP;
status_resp.buffer_occupancy_in_bytes = rlc_um_get_buffer_occupancy (rlc_p);
RLC_UM_MUTEX_LOCK(&rlc_p->lock_input_sdus, ctxt_pP, rlc_p);
if ((status_resp.buffer_occupancy_in_bytes > 0) && ((mb_p = list_get_head(&rlc_p->input_sdus)) != NULL)) {
if (enb_flagP == ENB_FLAG_YES) {
/* For eNB: add minimum RLC UM header size for the scheduler */
......@@ -411,7 +411,7 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
}
} else {
}
RLC_UM_MUTEX_UNLOCK(&rlc_p->lock_input_sdus);
status_resp.rlc_info.rlc_protocol_state = rlc_p->protocol_state;
if (LOG_DEBUGFLAG(DEBUG_RLC)) {
......
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