From f7b3ea03a32254c32049b8f1777b85b26bdd9f9c Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Tue, 15 May 2018 12:09:31 +0200
Subject: [PATCH] fix: hacks to have the UE functional again

The new 'basic simulator' is now functional.
A proper solution is needed to deal with SIB18/19/21
for the D2D functionality.
---
 openair2/RRC/LTE/MESSAGES/asn1_msg.c | 6 ++++++
 openair2/RRC/LTE/rrc_UE.c            | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
index d818d1bdf63..b20adc53173 100644
--- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c
+++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
@@ -477,6 +477,11 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
   ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type);
   ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo);
 
+#if 0
+  /* TODO: this is disabled for the moment because OAI UE does
+   * not connect to OAI eNB with the current software.
+   * See also TODO comment in do_SIB23.
+   */
   //TTN - This is for SIB18
   sib_type=SIB_Type_sibType18_v1250;
   ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type);
@@ -486,6 +491,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
   sib_type=SIB_Type_sibType19_v1250;
   ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type);
   ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo);
+#endif
 
   //  ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL);
 
diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c
index e1cc615ae68..ee1650a609f 100644
--- a/openair2/RRC/LTE/rrc_UE.c
+++ b/openair2/RRC/LTE/rrc_UE.c
@@ -5268,7 +5268,10 @@ openair_rrc_top_init_ue(
 #endif
 
 #ifdef Rel14
-  init_SL_preconfig(&UE_rrc_inst[module_id],0);
+  /* TODO: this is disabled for the moment because the standard UE
+   * crashes when calling this function.
+   */
+  //init_SL_preconfig(&UE_rrc_inst[module_id],0);
 #endif
 
   } else {
-- 
GitLab