From 6b3b0b0b8bf4ca922bd673347eba28fc9d6130d8 Mon Sep 17 00:00:00 2001
From: Robert Schmidt <robert.schmidt@eurecom.fr>
Date: Sun, 5 Apr 2020 11:39:22 +0200
Subject: [PATCH] Final CCE allocation check: print message on fail

---
 openair2/LAYER2/MAC/eNB_scheduler.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c
index 8d4b1ee5d6..c46005ee2d 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler.c
@@ -982,7 +982,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   /* Allocate CCEs for good after scheduling is done */
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
     if (cc[CC_id].tdd_Config == NULL || !(is_UL_sf(&cc[CC_id],subframeP))) {
-      allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2);
+      int rc = allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2);
+      if (rc < 0)
+        LOG_E(MAC, "%s() %4d.%d ERROR ALLOCATING CCEs\n", __func__, frameP, subframeP);
     }
   }
 
-- 
2.26.2