[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-420] GNB-DU Configuration Query and response
[o-du/l2.git] / src / du_app / du_ue_mgr.c
index 45b666a..28c657a 100644 (file)
@@ -527,7 +527,7 @@ int32_t genGnbDuUeF1apId(uint8_t cellId)
     GET_CELL_IDX(cellId, cellIdx);
     if(duCb.actvCellLst[cellIdx])
     {
-       return  ++duCb.actvCellLst[cellIdx]->gnbDuUeF1apIdGenerator;
+       return  ++duCb.gnbDuUeF1apIdGenerator;
     }
     else
     {
@@ -2353,7 +2353,7 @@ uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
  *     Processes UE create Req to RLC UL
  * 
  *  @params[in]  cellId,
- *               ueIdx,
+ *               ueId,
  *               Pointer to RlcUeCfg
  *  @return ROK     - success
  *          RFAILED - failure
@@ -2783,19 +2783,30 @@ uint8_t duProcUeContextModReq(DuUeCb *ueCb)
             }
          }
       }
-      else
+      else if(ueCb->f1UeDb->actionType == UE_CTXT_MOD)
       {
          ret = duBuildAndSendUeContextModReq(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg);
          if(ret == RFAILED)
          {
             DU_LOG("\nERROR  -->  DU APP : Failed to build ue context setup Req in duProcUeContextModReq()");
+            return RFAILED;
+         }
+      }
+      else if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
+      {
+         if((BuildAndSendUeContextModRsp(ueCb) != ROK))
+         {
+            DU_LOG("\nERROR  -->  DU APP : Failed to build UE Context modification response");
+            return RFAILED;
          }
       }
    }
    else
    {
       //TODO: To send the failure cause in UeContextModRsp
+      
       DU_LOG("ERROR  -->  DU APP : Failed to process UE CNTXT MOD REQ at duProcUeContextModReq()");
+      return RFAILED;
    }
    return ROK;
 }