From 3c6c697ae8b961f022074b59c9a5c646cfb9965a Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 13 Mar 2017 18:11:28 +0100 Subject: [PATCH] do not overwrite format0 ul grants until processed --- srslte/lib/ue/ue_dl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/srslte/lib/ue/ue_dl.c b/srslte/lib/ue/ue_dl.c index bd98802c0..f75c69fa2 100644 --- a/srslte/lib/ue/ue_dl.c +++ b/srslte/lib/ue/ue_dl.c @@ -394,9 +394,11 @@ static int dci_blind_search(srslte_ue_dl_t *q, dci_blind_search_t *search_space, // If searching for Format1A but found Format0 save it for later if (dci_msg->format == SRSLTE_DCI_FORMAT0 && search_space->format == SRSLTE_DCI_FORMAT1A) { - q->pending_ul_dci_rnti = crc_rem; - memcpy(&q->pending_ul_dci_msg, dci_msg, sizeof(srslte_dci_msg_t)); - memcpy(&q->last_location_ul, &search_space->loc[i], sizeof(srslte_dci_location_t)); + if (!q->pending_ul_dci_rnti) { + q->pending_ul_dci_rnti = crc_rem; + memcpy(&q->pending_ul_dci_msg, dci_msg, sizeof(srslte_dci_msg_t)); + memcpy(&q->last_location_ul, &search_space->loc[i], sizeof(srslte_dci_location_t)); + } // Else if we found it, save location and leave } else if (dci_msg->format == search_space->format) { ret = 1;