From a83ad18e4b2a5bf702c0f14f936c7543560fb9b7 Mon Sep 17 00:00:00 2001
From: knopp <knopp@mycompany.com>
Date: Wed, 24 Jun 2015 09:35:56 +0000
Subject: [PATCH] flagged an error condition in ulsch_decoding which causes a
 divide by zero, function now returns -1

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7646 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
index 4fe5ef473f..5774bc50be 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
@@ -299,12 +299,12 @@ unsigned int  ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
 
   if (harq_pid==255) {
     LOG_E(PHY, "FATAL ERROR: illegal harq_pid, returning\n");
-    return(-1);
+    return -1;
   }
 
   if (ulsch_harq->Nsymb_pusch == 0) {
       LOG_E(PHY, "FATAL ERROR: harq_pid %d, Nsymb 0!\n",harq_pid);
-      return(-1);
+      return 1+ulsch->max_turbo_iterations;
   }
   if (llr8_flag == 0)
     tc = phy_threegpplte_turbo_decoder16;
-- 
GitLab