From de937faa205fbcc04140c5143d51a5374b06bc69 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Sun, 29 Oct 2017 11:02:18 -0700 Subject: [PATCH] Set invalid inputs error to dlsch_decode --- lib/src/phy/phch/pdsch.c | 3 +++ lib/src/phy/phch/sch.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/phch/pdsch.c b/lib/src/phy/phch/pdsch.c index ddfcf3f86..99f4fbfa5 100644 --- a/lib/src/phy/phch/pdsch.c +++ b/lib/src/phy/phch/pdsch.c @@ -610,6 +610,9 @@ static int srslte_pdsch_codeword_decode(srslte_pdsch_t *q, srslte_pdsch_cfg_t *c } else if (ret == SRSLTE_ERROR) { *ack = false; ret = SRSLTE_SUCCESS; + } else if (ret == SRSLTE_ERROR_INVALID_INPUTS) { + *ack = false; + ret = SRSLTE_ERROR; } } else { ERROR("Detected NULL pointer in TB%d &softbuffer=%p &data=%p &ack=%p", codeword_idx, softbuffer, (void*)data, ack); diff --git a/lib/src/phy/phch/sch.c b/lib/src/phy/phch/sch.c index e76fa6aef..b9860ffa4 100644 --- a/lib/src/phy/phch/sch.c +++ b/lib/src/phy/phch/sch.c @@ -458,12 +458,12 @@ static int decode_tb(srslte_sch_t *q, if (cb_segm->F) { fprintf(stderr, "Error filler bits are not supported. Use standard TBS\n"); - return SRSLTE_ERROR; + return SRSLTE_ERROR_INVALID_INPUTS; } if (cb_segm->C > softbuffer->max_cb) { fprintf(stderr, "Error number of CB (%d) exceeds soft buffer size (%d CBs)\n", cb_segm->C, softbuffer->max_cb); - return SRSLTE_ERROR; + return SRSLTE_ERROR_INVALID_INPUTS; } bool crc_ok = true;