From 22da1eac0c8da0167c0cb0725cbe2a43b1ca0593 Mon Sep 17 00:00:00 2001
From: Wu Jing <wu.jing@cn.fujitsu.com>
Date: Tue, 17 Apr 2018 20:12:16 +0900
Subject: [PATCH] fix rm894 bug

---
 openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index dfd2e69506..12f960b546 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -231,6 +231,11 @@ rx_sdu(const module_id_t enb_mod_idP,
     payload_ptr =
 	parse_ulsch_header(sduP, &num_ce, &num_sdu, rx_ces, rx_lcids,
 			   rx_lengths, sdu_lenP);
+    if(payload_ptr == NULL){
+      LOG_E(MAC,"[eNB %d][PUSCH %d] CC_id %d ulsch header unknown lcid(rnti %x, UE_id %d)\n",
+                 enb_mod_idP, harq_pid, CC_idP,current_rnti, UE_id);
+      return;
+    }
 
     T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP),
       T_INT(current_rnti), T_INT(frameP), T_INT(subframeP),
@@ -944,7 +949,9 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
 		    ce_len++;
 		} else {
 		    LOG_E(MAC, "unknown CE %d \n", lcid);
-		    AssertFatal(1 == 0, "unknown CE");
+                    //RM894
+		    //AssertFatal(1 == 0, "unknown CE");
+                    return NULL;
 		}
 	    }
 	}
-- 
2.26.2