From c407cdba2dd9bede76e139626ba1049d00b700d6 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Wed, 11 Oct 2017 16:44:27 +0200
Subject: [PATCH] bugfix: use rnti 0 to mean "unused" instead of -1

-1 does not work
---
 openair1/PHY/LTE_TRANSPORT/dci_tools.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index 9c8a87e3ae..8df7177666 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -818,7 +818,7 @@ int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
   }
   if (type == SEARCH_EXIST) return -1;
   if (first_free_index != -1)
-    eNB->dlsch[first_free_index][0]->rnti = -1;
+    eNB->dlsch[first_free_index][0]->rnti = 0;
   return first_free_index;
 }
 
@@ -836,7 +836,7 @@ int8_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
   }
   if (type == SEARCH_EXIST) return -1;
   if (first_free_index != -1)
-    eNB->ulsch[first_free_index]->rnti = -1;
+    eNB->ulsch[first_free_index]->rnti = 0;
   return first_free_index;
 }
 
-- 
GitLab