From 80f47817d9d9c9a4447b369439d7ae2d51590a8b Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Sat, 11 Feb 2017 12:21:05 +0100
Subject: [PATCH] fix: warn if no PDSCH active

I doubt the case should happen. If it does, let's print an
error, will ease debugging.
---
 openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
index bd9b896dfa..14dfd95640 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
@@ -163,6 +163,10 @@ int rx_pdsch(PHY_VARS_UE *ue,
       dlsch1_harq = NULL;
       codeword_TB0 = -1;
     }
+    else {
+      LOG_E(PHY,"[UE][FATAL] Frame %d subframe %d: no active DLSCH\n",ue->proc.proc_rxtx[0].frame_rx,subframe);
+      return(-1);
+    }
     beamforming_mode  = ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id];
     break;
 
-- 
GitLab