Merge "[Issue Id-ODUHIGH-457] Fixes related to slice configuration in Ue Context...
[o-du/l2.git] / src / phy_stub / phy_stub_msg_hdl.c
index 8303333..5e462f4 100644 (file)
@@ -387,12 +387,17 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn, fapi_ul_pusch_pdu_
    GET_UE_ID(puschPdu.rnti, ueId);
    if(phyDb.ueDb.ueCb[ueId-1].isCFRA)
    {
-      /* In CF-RA in case of handover, RRC Reconfiguration Complete is sent
-       * by UE once RAR is received from DU */
-      phyDb.ueDb.ueCb[ueId-1].ueId = ueId;
-      phyDb.ueDb.ueCb[ueId-1].crnti = puschPdu.rnti;
-      phyDb.ueDb.ueCb[ueId-1].msgRrcReconfigComp = true;
-      type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
+      if(!phyDb.ueDb.ueCb[ueId-1].msgRrcReconfigComp)
+      {
+         /* In CF-RA in case of handover, RRC Reconfiguration Complete is sent
+          * by UE once RAR is received from DU */
+         phyDb.ueDb.ueCb[ueId-1].ueId = ueId;
+         phyDb.ueDb.ueCb[ueId-1].crnti = puschPdu.rnti;
+         phyDb.ueDb.ueCb[ueId-1].msgRrcReconfigComp = true;
+         type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
+      }
+      else
+         return ROK; 
    }
    else
    {
@@ -430,7 +435,7 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn, fapi_ul_pusch_pdu_
          type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
       }
       else
-         return RFAILED;
+         return ROK;
    }
 
    MAC_ALLOC(rxDataInd, sizeof(fapi_rx_data_indication_t));