From e8cc09b3cccdc5ba9c0cee75d8c24efbb5aae7f2 Mon Sep 17 00:00:00 2001
From: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Date: Wed, 8 Jul 2015 14:14:27 +0800
Subject: [PATCH] lte-ue: fix the initialization of UE NAS

The NAS UE is not initialized by the UE of lte-softmodem.
Fix this.

Signed-off-by: Chun-Yeow Yeoh <yeow@tmrnd.com.my>
---
 targets/RT/USER/lte-ue.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index 7c82b7976c..f12c6b1240 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -1019,6 +1019,10 @@ void *UE_thread(void *arg)
 
   openair0_timestamp timestamp;
 
+#ifdef NAS_UE
+  MessageDef *message_p;
+#endif
+
 #ifdef RTAI
   RT_TASK *task = rt_task_init_schmod(nam2num("UE thread"), 0, 0, 0, SCHED_FIFO, 0xF);
 
@@ -1074,6 +1078,11 @@ void *UE_thread(void *arg)
 
   printf("starting UE thread\n");
 
+#ifdef NAS_UE
+  message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE);
+  itti_send_msg_to_task (TASK_NAS_UE, INSTANCE_DEFAULT, message_p);
+#endif
+
   T0 = rt_get_time_ns();
   first_rx = 1;
   rxpos=0;
-- 
GitLab