Commit 9c87e73b authored by Xu Bo's avatar Xu Bo Committed by jftt

fix Segmentation fault issue

parent 2407b4af
...@@ -834,10 +834,10 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -834,10 +834,10 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
if (uci->type == SR) { if (uci->type == SR) {
if (SR_payload == 1) { if (SR_payload == 1) {
fill_sr_indication(eNB,uci->rnti,frame,subframe,metric_SR); fill_sr_indication(eNB,uci->rnti,frame,subframe,metric_SR);
return; continue;
} }
else { else {
return; continue;
} }
} }
case HARQ: case HARQ:
......
...@@ -2293,18 +2293,20 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -2293,18 +2293,20 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
for ( ulsch_ue_num = 0; ulsch_ue_num < ulsch_ue_select[CC_id].ue_num; ulsch_ue_num++ ) { for ( ulsch_ue_num = 0; ulsch_ue_num < ulsch_ue_select[CC_id].ue_num; ulsch_ue_num++ ) {
UE_id = ulsch_ue_select[CC_id].list[ulsch_ue_num].UE_id; UE_id = ulsch_ue_select[CC_id].list[ulsch_ue_num].UE_id;
rnti = UE_RNTI(CC_id,UE_id);
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_MSG3) { if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_MSG3) {
first_rb[CC_id] ++; first_rb[CC_id] ++;
ue_num_temp--; ue_num_temp--;
continue; continue;
} }
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_PRACH) { if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_PRACH) {
first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb; first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
ue_num_temp--; ue_num_temp--;
continue; continue;
} }
rnti = UE_RNTI(CC_id,UE_id);
if ( first_rb[CC_id] >= frame_parms->N_RB_UL-1 ) { if ( first_rb[CC_id] >= frame_parms->N_RB_UL-1 ) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n", LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id); module_idP,frameP,subframeP,UE_id,rnti,CC_id);
...@@ -2338,8 +2340,8 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -2338,8 +2340,8 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
} }
} }
}else{ }else{
UE_template = &UE_list->UE_template[CC_id][ulsch_ue_select[CC_id].list[ulsch_ue_num].UE_id]; UE_template = &UE_list->UE_template[CC_id][UE_id];
if ( UE_list->UE_sched_ctrl[ulsch_ue_select[CC_id].list[ulsch_ue_num].UE_id].phr_received == 1 ) { if ( UE_list->UE_sched_ctrl[UE_id].phr_received == 1 ) {
mcs = 20; mcs = 20;
} else { } else {
mcs = 10; mcs = 10;
......
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