From eaa9d0fc81e23a8bb0106cb94b92ab1199cba049 Mon Sep 17 00:00:00 2001 From: Navid Nikaein <navid.nikaein@eurecom.fr> Date: Mon, 16 Mar 2015 21:04:29 +0000 Subject: [PATCH] fix for MAC UE_list->next[i] when next element does not exist, fix for OTGplot warning git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6818 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair2/LAYER2/MAC/eNB_scheduler.c | 3 ++- openair2/UTIL/OTG/OTGplot | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index e71af7788eb..64c6533b565 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -110,8 +110,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, mbsfn_status[CC_id]=0; } // refresh UE list based on UEs dropped by PHY in previous subframe - for (i=UE_list->head;i>=0;i=UE_list->next[i]) { + for (i=UE_list->head;i>=0;i=i=next_i) { LOG_D(MAC,"UE %d: rnti %x (%p)\n",i,UE_RNTI(module_idP,i),mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))); + next_i= UE_list->next[i]; if (mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))==NULL) mac_remove_ue(module_idP,i,frameP); } diff --git a/openair2/UTIL/OTG/OTGplot b/openair2/UTIL/OTG/OTGplot index 8dc720a7098..1c276adb780 100755 --- a/openair2/UTIL/OTG/OTGplot +++ b/openair2/UTIL/OTG/OTGplot @@ -35,7 +35,7 @@ endwhile labels=[labels; strcat("-@;",s,";") ]; # add the last string (Aggregate-Flow) if nargin>1 - mask=intersection(str2num(arg_list{2}),1:size(labels,1)); + mask=intersect(str2num(arg_list{2}),1:size(labels,1)); else mask=1:size(labels,1); endif @@ -48,8 +48,8 @@ endif # read data data=fscanf(f,"%f",[size(labels,1)+1,Inf])'; -temp=split(strrep(inputf,"\\","/"),"/"); -outputf=split(deblank(temp(size(temp,1),:)),"."); +temp=char(strsplit(strrep(inputf,"\\","/"),"/")); +outputf=char(strsplit(deblank(temp(size(temp,1),:)),".")); ylbl=outputf(1,:); #ylbl(1,1)=toupper(ylbl(1,1)); -- GitLab