From f84e52bad5d2d043a4ad484c3684e24bfd9b67ab Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Sun, 20 Jan 2019 15:39:58 +0100
Subject: [PATCH] replaced AssertFatal with LOG_E and RA procedure cancellation

---
 openair2/LAYER2/MAC/eNB_scheduler_RA.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
index 73213eb1c8b..32166fdb9c9 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
@@ -667,7 +667,11 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
     N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
 
     UE_id = find_UE_id(module_idP, ra->rnti);
-    AssertFatal(UE_id >= 0, "Can't find UE for t-crnti %x\n",ra->rnti);
+    if (UE_id < 0) {
+      LOG_E(MAC,"Can't find UE for t-crnti %x, kill RA procedure for this UE\n",ra->rnti);
+      cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
+      return;
+    }
 
     // set HARQ process round to 0 for this UE
 
-- 
GitLab