[Epic-ID: ODUHIGH-516][Task-ID: ODUHIGH-527] Modifying DU's E2 node configurations
[o-du/l2.git] / src / du_app / du_f1ap_msg_hdl.c
index c263e52..d9b5022 100644 (file)
@@ -1759,17 +1759,19 @@ uint8_t BuildAndSendF1SetupReq()
          
 
       }
-      if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_ADD, true, encBufSize, encBuf) !=ROK)
-      {
-         DU_LOG("\nERROR  -->  F1AP : Failed to add the e2 node in the list");
-         break;
-      }
+      
       /* Sending msg */
       if(sendF1APMsg() != ROK)
       {
          DU_LOG("\nERROR  -->  F1AP : Sending F1 Setup request failed");
          break;
       }
+      
+      if(fillE2NodeComponentReqInfo(F1, duCfgParam.duId,  E2_NODE_COMPONENT_ADD, encBufSize, encBuf) !=ROK)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Failed to add the e2 node in the list");
+         break;
+      }
 
       ret=ROK;
       break;
@@ -2762,17 +2764,19 @@ uint8_t BuildAndSendDUConfigUpdate(ServCellAction servCellAction)
          }
 #endif
       }
-      if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_UPDATE, true, encBufSize, encBuf)!=ROK)
-      {
-         DU_LOG("\nERROR  -->  F1AP : Failed to update the e2 node in the list");
-         break;
-      }
+      
       /* Sending msg */
       if(sendF1APMsg() != ROK)
       {
          DU_LOG("\nERROR  -->  F1AP : Sending GNB-DU Config Update failed");
          break;
       }
+      
+      if(fillE2NodeComponentReqInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_UPDATE, encBufSize, encBuf)!=ROK)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Failed to update the e2 node in the list");
+         break;
+      }
 
       ret = ROK;
       break;
@@ -15552,7 +15556,7 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf)
    duProcF1SetupRsp();
    freeAperDecodeF1SetupRsp(f1SetRspMsg);
    
-   if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_ADD, false, recvBufLen, recvBuf) !=ROK)
+   if(fillE2NodeComponentRspInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_ADD, recvBufLen, recvBuf) !=ROK)
    {
       DU_LOG("\nERROR  -->  F1AP : Failed to add the e2 node in the list");
       return RFAILED;
@@ -15781,13 +15785,14 @@ uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvB
    }
 #endif
 
-   if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_UPDATE, false, recvBufLen, recvBuf) !=ROK)
+   freeAperDecodeGnbDuAck(gnbDuAck);
+   
+   if(fillE2NodeComponentRspInfo(F1,duCfgParam.duId, E2_NODE_COMPONENT_UPDATE, recvBufLen, recvBuf) !=ROK)
    {
       DU_LOG("\nERROR  -->  F1AP : Failed to update the e2 node in the list");
       return RFAILED;
    }
 
-   freeAperDecodeGnbDuAck(gnbDuAck);
    return ROK;
 }
 /******************************************************************