From 7f4c22f851f5cf04bd2cfadbd2e3decc5f832461 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Thu, 25 Feb 2016 12:01:31 +0100
Subject: [PATCH] bugfix in allocate_CCEs

---
 openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
index 7162501f89d..d709dcdfda1 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
@@ -991,13 +991,11 @@ int allocate_CCEs(int module_idP,
   int allocation_is_feasible = 1;
   DCI_ALLOC_t *dci_alloc;
 
-
   LOG_D(MAC,"Allocate CCEs subframe %d, test %d : (common %d,uspec %d)\n",subframeP,test_onlyP,DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
 
-  init_CCE_table(module_idP,CC_idP);
-  DCI_pdu->nCCE=0;
-
   while (allocation_is_feasible == 1) {
+    init_CCE_table(module_idP,CC_idP);
+    DCI_pdu->nCCE=0;
 
     for (i=0;i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci;i++) {
       dci_alloc = &DCI_pdu->dci_alloc[i];
-- 
GitLab