[ JIRA Id - ODUHIGH-573 ] Code changes upgraded to Gcc version 11.4.0
[o-du/l2.git] / src / ric_stub / ric_e2ap_msg_hdl.c
index b7a9eab..c43c4db 100644 (file)
@@ -44,6 +44,8 @@
 #include "E2SM-KPM-EventTriggerDefinition.h"
 #include "E2connectionUpdate-Item.h"
 
+
+char encBuf[ENC_BUF_MAX_LEN];
 /*******************************************************************
  *
  * @brief Printing Type and Cause of failure
@@ -333,7 +335,8 @@ void FreeRemovalRequest(E2AP_PDU_t *e2apMsg)
  * ****************************************************************/
 uint8_t BuildAndSendRemovalRequest(DuDb *duDb)
 {
-   uint8_t ieIdx = 0, elementCnt = 0, transId = 0;
+   uint8_t ieIdx = 0, elementCnt = 0;
+   uint16_t transId = 0;
    uint8_t ret = RFAILED;
    E2AP_PDU_t        *e2apMsg = NULLP;
    E2RemovalRequest_t  *removalReq = NULLP;
@@ -829,7 +832,7 @@ void FreeE2ConfigUpdateFail(E2AP_PDU_t *e2apMsg)
  *
  * ****************************************************************/
 
-uint8_t BuildAndSendE2NodeConfigUpdateFailure(uint32_t duId, uint8_t transId, uint8_t causeInfo, uint8_t causeReason)
+uint8_t BuildAndSendE2NodeConfigUpdateFailure(uint32_t duId, uint16_t transId, uint8_t causeInfo, uint8_t causeReason)
 {
    E2AP_PDU_t         *e2apMsg = NULL;
    asn_enc_rval_t     encRetVal;
@@ -965,7 +968,8 @@ void ProcE2NodeConfigUpdate(uint32_t duId, E2nodeConfigurationUpdate_t *e2NodeCo
    DuDb    *duDb = NULLP;
    E2NodeConfigList tmpE2NodeList;
    uint16_t arrIdx=0;
-   uint8_t ieIdx = 0, duIdx = 0, elementCnt=0, transId = 0; 
+   uint8_t ieIdx = 0, duIdx = 0, elementCnt=0;
+   uint16_t transId = 0; 
    E2nodeComponentConfigAddition_List_t *e2NodeAddList=NULL;
    E2nodeComponentConfigAddition_ItemIEs_t *e2NodeAddItemIe=NULL;
    E2nodeComponentConfigAddition_Item_t *e2NodeAddItem=NULL;
@@ -1360,10 +1364,7 @@ uint8_t fillE2NodeConfigAck(PTR e2NodeCfg, uint8_t procedureCode, E2NodeComponen
 uint8_t BuildE2nodeComponentConfigAdditionAck(E2nodeComponentConfigAdditionAck_List_t *e2NodeConfigAdditionAckList, \
 uint16_t addedE2NodeCount, E2NodeConfigItem *addedE2Node)
 {
-   E2NodeComponent *e2NodeComponentInfo=NULLP;
-   CmLList *node=NULLP;
    uint16_t arrIdx = 0;
-   E2nodeComponentConfigAdditionAck_Item_t *e2NodeAddAckItem=NULLP;
    E2nodeComponentConfigAdditionAck_ItemIEs_t *e2NodeAddAckItemIe=NULLP;
   
    e2NodeConfigAdditionAckList->list.count = addedE2NodeCount;
@@ -1388,7 +1389,6 @@ uint16_t addedE2NodeCount, E2NodeConfigItem *addedE2Node)
       e2NodeAddAckItemIe->id = ProtocolIE_IDE2_id_E2nodeComponentConfigAdditionAck_Item;
       e2NodeAddAckItemIe->criticality = CriticalityE2_reject;
       e2NodeAddAckItemIe->value.present = E2nodeComponentConfigAdditionAck_ItemIEs__value_PR_E2nodeComponentConfigAdditionAck_Item;
-      e2NodeAddAckItem = &e2NodeAddAckItemIe->value.choice.E2nodeComponentConfigAdditionAck_Item;
 
       /* Filling the e2 node config addition ack item */
       fillE2NodeConfigAck((PTR)&e2NodeAddAckItemIe->value.choice.E2nodeComponentConfigAdditionAck_Item, ProtocolIE_IDE2_id_E2nodeComponentConfigAdditionAck,\
@@ -1496,7 +1496,7 @@ uint8_t BuildRanFunctionAcceptedList(DuDb *duDb, uint8_t count, RanFunction *ran
  *
  * ****************************************************************/
 
-uint8_t BuildAndSendE2SetupRsp(DuDb *duDb, uint8_t transId, E2NodeConfigList e2NodeList)
+uint8_t BuildAndSendE2SetupRsp(DuDb *duDb, uint16_t transId, E2NodeConfigList e2NodeList)
 {
    E2AP_PDU_t         *e2apMsg = NULL;
    E2setupResponse_t  *e2SetupRsp;
@@ -1996,6 +1996,7 @@ uint8_t fillActionToBeSetup(RICaction_ToBeSetup_ItemIEs_t *actionItem, RicSubscr
    
    if(actionNode)
    {
+      cmLListDelFrm(&ricSubsDb->actionSequence, actionNode);
       deleteActionSequence(actionNode);
    }
    return RFAILED;
@@ -2193,7 +2194,6 @@ uint8_t BuildAndSendRicSubscriptionReq(DuDb *duDb)
    uint8_t         ret = RFAILED;
    uint8_t         elementCnt = 0;
    uint8_t         idx = 0;
-   uint8_t         actionIdx = 0;
    asn_enc_rval_t  encRetVal;        /* Encoder return value */
    E2AP_PDU_t                 *e2apRicMsg = NULL;
    RICsubscriptionRequest_t   *ricSubscriptionReq;
@@ -2437,7 +2437,8 @@ void ProcRicSubscriptionResponse(uint32_t duId, RICsubscriptionResponse_t  *ricS
                               action = fetchActionInfoFromActionId(actionId, ricSubs, &actionNode);
                               if(action)
                               {
-                                 deleteActionSequence(action);
+                                 cmLListDelFrm(&ricSubs->actionSequence, actionNode);
+                                 deleteActionSequence(actionNode);
                               }
                            }
                         }
@@ -2503,7 +2504,7 @@ void FreeE2SetupFailure(E2AP_PDU_t *e2apMsg)
  *
  * ****************************************************************/
 
-uint8_t BuildAndSendE2SetupFailure(uint32_t duId, uint8_t transId)
+uint8_t BuildAndSendE2SetupFailure(uint32_t duId, uint16_t transId)
 {
    uint8_t            ret = RFAILED;
    E2AP_PDU_t         *e2apMsg = NULL;
@@ -2634,11 +2635,11 @@ uint8_t BuildAndSendE2SetupFailure(uint32_t duId, uint8_t transId)
 
 void ProcE2SetupReq(uint32_t *duId, E2setupRequest_t  *e2SetupReq)
 {
-   uint8_t arrIdx = 0, duIdx = 0, transId =0;
+   uint8_t arrIdx = 0, duIdx = 0;
+   uint16_t transId =0;
    uint16_t ranFuncIdx=0, e2NodeAddListIdx =0;
    E2NodeConfigList tmpE2NodeList;
    DuDb    *duDb = NULLP;
-   bool ieProcessingFailed = false;
    E2nodeComponentConfigAddition_List_t *e2NodeAddList=NULLP;
    E2nodeComponentConfigAddition_ItemIEs_t *e2NodeAddItem=NULLP;
    RANfunction_ItemIEs_t *ranFuncItemIe=NULLP;
@@ -2797,7 +2798,7 @@ void FreeE2ResetResponse(E2AP_PDU_t *e2apMsg)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildAndSendResetResponse(uint32_t duId, uint8_t transId)
+uint8_t BuildAndSendResetResponse(uint32_t duId, uint16_t transId)
 {
    uint8_t           ieIdx = 0, elementCnt = 0;
    uint8_t           ret = RFAILED;
@@ -3141,7 +3142,7 @@ void FreeRicServiceUpdateFailure(E2AP_PDU_t *e2apMsg)
  *
  ******************************************************************/
 
-uint8_t BuildAndSendRicServiceUpdateFailure(uint32_t duId, int8_t transId, CauseE2_PR causePresent, uint8_t reason)
+uint8_t BuildAndSendRicServiceUpdateFailure(uint32_t duId, uint16_t transId, CauseE2_PR causePresent, uint8_t reason)
 {
 
    E2AP_PDU_t         *e2apMsg = NULL;
@@ -3394,7 +3395,7 @@ uint8_t BuildRanFunctionRejectedList(uint8_t count, RanFunction *ranFunRejectedL
  *
  ******************************************************************/
 
-uint8_t BuildAndSendRicServiceUpdateAcknowledge(DuDb *duDb, int8_t transId, RicTmpRanFunList ricRanFuncList)
+uint8_t BuildAndSendRicServiceUpdateAcknowledge(DuDb *duDb, uint16_t transId, RicTmpRanFunList ricRanFuncList)
 {
    E2AP_PDU_t         *e2apMsg = NULL;
    asn_enc_rval_t     encRetVal;
@@ -4621,7 +4622,8 @@ uint8_t ProcRicSubsModReqd(uint32_t duId, RICsubscriptionModificationRequired_t
                   if(action)
                   {
                      tmpActionList.actionRemovedList[tmpActionList.numActionRemoved++] = actionId;
-                     deleteActionSequence(action);
+                     cmLListDelFrm(&ricSubs->actionSequence, actionNode);
+                     deleteActionSequence(actionNode);
                   }
                }
                break;
@@ -4712,7 +4714,7 @@ void FreeErrorIndication(E2AP_PDU_t  *e2apMsg)
  *
  ******************************************************************/
 
-uint8_t BuildAndSendErrorIndication(uint32_t duId, int8_t transId, RicRequestId requestId, uint16_t ranFuncId, uint8_t reason)
+uint8_t BuildAndSendErrorIndication(uint32_t duId, uint16_t transId, RicRequestId requestId, uint16_t ranFuncId, uint8_t reason)
 {
    uint8_t elementCnt =0, arrIdx=0, ret = RFAILED;
    E2AP_PDU_t         *e2apMsg = NULLP;
@@ -4905,7 +4907,8 @@ void FreeResetRequest(E2AP_PDU_t *e2apMsg)
  * ****************************************************************/
 uint8_t BuildAndSendResetRequest(DuDb *duDb, CauseE2_PR causePresent, uint8_t reason)
 {
-   uint8_t ieIdx = 0, elementCnt = 0, transId = 0;
+   uint8_t ieIdx = 0, elementCnt = 0;
+   uint16_t transId = 0;
    uint8_t ret = RFAILED;
    E2AP_PDU_t        *e2apMsg = NULLP;
    ResetRequestE2_t  *resetReq = NULLP;
@@ -5088,7 +5091,6 @@ void deleteActionSequenceList(CmLListCp *actionList)
  * ****************************************************************/
 void deleteRicSubscriptionNode(CmLList *subscriptionNode)
 {
-   uint8_t actionIdx=0;
    RicSubscription *ricSubscriptionInfo = NULLP;
 
    ricSubscriptionInfo = (RicSubscription*)subscriptionNode->node;
@@ -5218,7 +5220,8 @@ void ProcResetResponse(uint32_t duId, ResetResponseE2_t *resetRsp)
 
 void ProcResetRequest(uint32_t duId, ResetRequestE2_t *resetReq)
 {
-   uint8_t ieIdx = 0, duIdx =0, transId=0;
+   uint8_t ieIdx = 0, duIdx =0;
+   uint16_t transId=0;
    DuDb *duDb = NULLP;
    RanFunction *ranFuncDb = NULLP;
    uint16_t ranFuncIdx = 0;
@@ -5291,7 +5294,7 @@ void ProcResetRequest(uint32_t duId, ResetRequestE2_t *resetReq)
  ******************************************************************/
 void FreeRicSubscriptionDeleteRequest(E2AP_PDU_t *e2apMsg)
 {
-   uint8_t ieIdx = 0, arrIdx = 0;
+   uint8_t ieIdx = 0;
    RICsubscriptionDeleteRequest_t *ricSubsDelReq = NULLP;
 
    if(e2apMsg)
@@ -5880,7 +5883,7 @@ uint16_t updatedE2NodeCount, E2NodeConfigItem *updatedE2Node)
  *
  * ****************************************************************/
 
-uint8_t BuildAndSendE2NodeConfigUpdateAck(DuDb *duDb, uint8_t transId,  E2NodeConfigList *e2NodeList)
+uint8_t BuildAndSendE2NodeConfigUpdateAck(DuDb *duDb, uint16_t transId,  E2NodeConfigList *e2NodeList)
 {
    uint8_t ret = RFAILED;
    uint8_t arrIdx = 0,elementCnt = 0;
@@ -6044,7 +6047,8 @@ uint8_t BuildAndSendE2NodeConfigUpdateAck(DuDb *duDb, uint8_t transId,  E2NodeCo
  * ****************************************************************/
 void ProcE2RemovalFailure(E2RemovalFailure_t *e2RemovalFailure) 
 {
-   uint8_t ieIdx = 0, transId=0;
+   uint8_t ieIdx = 0;
+   uint16_t transId=0;
    CauseE2_t *cause = NULLP;
 
    if(!e2RemovalFailure)
@@ -6079,7 +6083,7 @@ void ProcE2RemovalFailure(E2RemovalFailure_t *e2RemovalFailure)
                }
             default:
                {
-                  DU_LOG("\nERROR  -->  E2AP : Received Invalid Ie [%d]", e2RemovalFailure->protocolIEs.list.array[ieIdx]->id);
+                  DU_LOG("\nERROR  -->  E2AP : Received Invalid Ie [%ld]", e2RemovalFailure->protocolIEs.list.array[ieIdx]->id);
                   break;
                }
          }
@@ -6452,7 +6456,7 @@ uint8_t BuildAndSendRemovalResponse(uint32_t duId, uint16_t transId)
       if(duDb == NULLP)
       {
          DU_LOG("\nERROR  -->  E2AP : duDb is not present for duId %d",duId);
-         return;
+         return RFAILED;
       }
    
       RIC_ALLOC(e2apMsg, sizeof(E2AP_PDU_t));
@@ -7052,7 +7056,7 @@ void ProcE2connectionUpdateFailure(E2connectionUpdateFailure_t *updateFailure)
                }
             default:
                {
-                  DU_LOG("\nERROR  -->  E2AP : Received Invalid Ie [%d]", updateFailure->protocolIEs.list.array[ieIdx]->id);
+                  DU_LOG("\nERROR  -->  E2AP : Received Invalid Ie [%ld]", updateFailure->protocolIEs.list.array[ieIdx]->id);
                   break;
                }
          }
@@ -7778,12 +7782,10 @@ uint8_t BuildAndSendRicSubscriptionModReq(DuDb *duDb, RicSubscription **ricSubsI
 {
    uint8_t         ret = RFAILED;
    uint8_t         elementCnt = 0;
-   uint8_t         idx = 0, cfgIdx=0;
+   uint8_t         idx = 0;
    asn_enc_rval_t  encRetVal;        /* Encoder return value */
    E2AP_PDU_t                 *e2apRicMsg = NULL;
    RICsubscriptionModificationRequest_t   *ricSubscriptionModReq;
-   RanFunction  *ranFuncDb = &duDb->ranFunction[0];
-   CmLList *subscriptionNode = NULLP;
    
    DU_LOG("\nINFO   -->  E2AP : Building RIC Subscription Request\n");
 
@@ -8004,6 +8006,364 @@ void BuildRicSubsModificationReq(DuDb *duDb, RicSubscription *ricSubsInfo)
    }
 }
 
+/****************************************************************
+ *
+ * @brief Processing RIC Subscription action modified list
+ *
+ * @details
+ *
+ *    Function :ProcessingRicSubsActionModified 
+ *
+ *    Functionality: Processing the RIC Subscription action modified list
+ *
+ * @params[in] RICactions_AddedForModification_List_t
+ * @return void
+ *
+ * ****************************************************************/
+void ProcessingRicSubsActionModified(RICactions_ModifiedForModification_List_t *actionModifiedList)
+{
+   uint8_t actionId=0;
+   uint8_t elementIdx = 0;
+   RICaction_ModifiedForModification_ItemIEs_t *modifiedActionItemIe =NULLP;
+
+   if(actionModifiedList->list.array)
+   {
+      for(elementIdx = 0; elementIdx < actionModifiedList->list.count; elementIdx++)
+      {
+         if(actionModifiedList->list.array[elementIdx])
+         {
+            modifiedActionItemIe=(RICaction_ModifiedForModification_ItemIEs_t*)actionModifiedList->list.array[elementIdx];
+            actionId = modifiedActionItemIe->value.choice.RICaction_ModifiedForModification_Item.ricActionID;
+            DU_LOG("\nInfo  -->  E2AP : Action id %d modified successfully",  actionId);
+         }
+
+      }
+
+   }
+}
+
+/****************************************************************
+ *
+ * @brief Processing RIC Subscription action added list
+ *
+ * @details
+ *
+ *    Function : ProcessingRicSubsActionAdded
+ *
+ *    Functionality: Processing RIC Subscription action added  list
+ *
+ * @params[in] RICactions_AddedForModification_List_t
+ * @return void
+ *
+ * ****************************************************************/
+void ProcessingRicSubsActionAdded(RICactions_AddedForModification_List_t *actionAddedList)
+{
+   uint8_t actionId=0;
+   uint8_t elementIdx = 0;
+   RICaction_AddedForModification_ItemIEs_t *addedActionItemIe =NULLP;
+
+   if(actionAddedList->list.array)
+   {
+      for(elementIdx = 0; elementIdx < actionAddedList->list.count; elementIdx++)
+      {
+         if(actionAddedList->list.array[elementIdx])
+         {
+            addedActionItemIe=(RICaction_AddedForModification_ItemIEs_t*)actionAddedList->list.array[elementIdx];
+            actionId = addedActionItemIe->value.choice.RICaction_AddedForModification_Item.ricActionID;
+            DU_LOG("\nInfo  -->  E2AP : Action id %d added successfully",  actionId);
+         }
+
+      }
+
+   }
+}
+
+/****************************************************************
+ *
+ * @brief Processing RIC Subscription action deleted list
+ *
+ * @details
+ *
+ *    Function : ProcessingRicSubsActionRemoved
+ *
+ *    Functionality: Processing RIC Subscription action deleted list
+ *
+ * @params[in] RICactions_RemovedForModification_List_t
+ *             Ric Subscription info
+ * @return void
+ *
+ * ****************************************************************/
+void ProcessingRicSubsActionRemoved(RICactions_RemovedForModification_List_t *actionRemovedList, RicSubscription *ricSubs)
+{
+   uint8_t actionId=0;
+   uint8_t elementIdx = 0;
+   ActionInfo *action=NULLP;
+   CmLList *actionNode =NULLP;
+   RICaction_RemovedForModification_ItemIEs_t *removedActionItemIe =NULLP;
+
+   if(actionRemovedList->list.array)
+   {
+      for(elementIdx = 0; elementIdx < actionRemovedList->list.count; elementIdx++)
+      {
+         if(actionRemovedList->list.array[elementIdx])
+         {
+            removedActionItemIe=(RICaction_RemovedForModification_ItemIEs_t*)actionRemovedList->list.array[elementIdx];
+            actionId = removedActionItemIe->value.choice.RICaction_RemovedForModification_Item.ricActionID;
+            action = fetchActionInfoFromActionId(actionId, ricSubs, &actionNode);
+            if(action)
+            {
+               cmLListDelFrm(&ricSubs->actionSequence, actionNode);
+               deleteActionSequence(actionNode);
+               DU_LOG("\nInfo  -->  E2AP : Action id %d removed successfully",  actionId);
+            }
+         }
+
+      }
+
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Processing RIC Subscription action failed to be
+ * removed list
+ *
+ * @details
+ *
+ *    Function : ProcessingRicSubsActionFailedToBeRemoved
+ *
+ *    Functionality: Processing the RIC Subscription action failed
+ *    to be removed list
+ *
+ * @params[in] RICactions_FailedToBeRemovedForModification_List_t 
+ * @return void
+ *
+ * ****************************************************************/
+void ProcessingRicSubsActionFailedToBeRemoved(RICactions_FailedToBeRemovedForModification_List_t *actionFailedToBeRemoved)
+{
+   uint8_t actionId=0;
+   uint8_t elementIdx = 0;
+   RICaction_FailedToBeRemovedForModification_ItemIEs_t *failedToBeRemovedActionItemIe =NULLP;
+
+   if(actionFailedToBeRemoved->list.array)
+   {
+      for(elementIdx = 0; elementIdx < actionFailedToBeRemoved->list.count; elementIdx++)
+      {
+         if(actionFailedToBeRemoved->list.array[elementIdx])
+         {
+            failedToBeRemovedActionItemIe=(RICaction_FailedToBeRemovedForModification_ItemIEs_t*)actionFailedToBeRemoved->list.array[elementIdx];
+            actionId = failedToBeRemovedActionItemIe->value.choice.RICaction_FailedToBeRemovedForModification_Item.ricActionID;
+            DU_LOG("\nERROR  -->  E2AP : Failed to remove action id %d in %s", actionId, __func__);
+            printE2ErrorCause(&failedToBeRemovedActionItemIe->value.choice.RICaction_FailedToBeRemovedForModification_Item.cause);
+         }
+
+      }
+
+   }
+}
+
+/****************************************************************
+ *
+ * @brief Processing RIC Subscription action failed to be
+ * add list
+ *
+ * @details
+ *
+ *    Function : ProcessingRicSubsActionFailedToBeAdded
+ *
+ *    Functionality: Processing the RIC Subscription action failed
+ *    to be add list
+ *
+ * @params[in] RICactions_FailedToBeAddedForModification_List_t 
+ * @return void
+ *
+ * ****************************************************************/
+void ProcessingRicSubsActionFailedToBeAdded(RICactions_FailedToBeAddedForModification_List_t *actionfailedToBeAddedList, RicSubscription *ricSubs)
+{
+   uint8_t actionId=0;
+   uint8_t elementIdx = 0;
+   ActionInfo *action=NULLP;
+   CmLList *actionNode =NULLP;
+   RICaction_FailedToBeAddedForModification_ItemIEs_t *failedToBeAddedActionItemIe =NULLP;
+
+   if(actionfailedToBeAddedList->list.array)
+   {
+      for(elementIdx = 0; elementIdx < actionfailedToBeAddedList->list.count; elementIdx++)
+      {
+         if(actionfailedToBeAddedList->list.array[elementIdx])
+         {
+            failedToBeAddedActionItemIe=(RICaction_FailedToBeAddedForModification_ItemIEs_t*)actionfailedToBeAddedList->list.array[elementIdx];
+            actionId = failedToBeAddedActionItemIe->value.choice.RICaction_FailedToBeAddedForModification_Item.ricActionID;
+            action = fetchActionInfoFromActionId(actionId, ricSubs, &actionNode);
+            if(action)
+            {
+               cmLListDelFrm(&ricSubs->actionSequence, actionNode);
+               deleteActionSequence(actionNode);
+            }
+            DU_LOG("\nERROR  -->  E2AP : Failed to remove action id %d in %s", actionId,__func__);
+            printE2ErrorCause(&failedToBeAddedActionItemIe->value.choice.RICaction_FailedToBeAddedForModification_Item.cause);
+         }
+
+      }
+
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Processing RIC Subscription action failed to be
+ * modified list
+ *
+ * @details
+ *
+ *    Function :ProcessingRicSubsActionFailedToBeModified 
+ *
+ *    Functionality: Processing the RIC Subscription action failed
+ *    to be modified list
+ *
+ * @params[in] RICactions_FailedToBeModifiedForModification_List_t 
+ * @return void
+ *
+ * ****************************************************************/
+void ProcessingRicSubsActionFailedToBeModified(RICactions_FailedToBeModifiedForModification_List_t *actionFailedToBeModifiedList)
+{
+   uint8_t actionId=0;
+   uint8_t elementIdx = 0;
+   RICaction_FailedToBeModifiedForModification_ItemIEs_t *failedToBeModifiedActionItemIe =NULLP;
+
+   if(actionFailedToBeModifiedList->list.array)
+   {
+      for(elementIdx = 0; elementIdx < actionFailedToBeModifiedList->list.count; elementIdx++)
+      {
+         if(actionFailedToBeModifiedList->list.array[elementIdx])
+         {
+            failedToBeModifiedActionItemIe=(RICaction_FailedToBeModifiedForModification_ItemIEs_t*)actionFailedToBeModifiedList->list.array[elementIdx];
+            actionId = failedToBeModifiedActionItemIe->value.choice.RICaction_FailedToBeModifiedForModification_Item.ricActionID;
+            DU_LOG("\nERROR  -->  E2AP : Failed to remove action id %d in %s", actionId,__func__);
+            printE2ErrorCause(&failedToBeModifiedActionItemIe->value.choice.RICaction_FailedToBeModifiedForModification_Item.cause);
+         }
+
+      }
+
+   }
+}
+
+/******************************************************************
+ *
+ * @brief Processes the Ric Subs modification rsp msg
+ *
+ * @details
+ *
+ *    Function : ProcRicSubsModificationRsp
+ *
+ *    Functionality: Processes the Ric Subs modification rsp msg
+ *
+ * @params[in]
+ *       Ric Subs modification rsp information
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void ProcRicSubsModificationRsp(uint32_t duId, RICsubscriptionModificationResponse_t *ricSubsModificationRsp)
+{
+   uint8_t ieIdx = 0;
+   uint8_t duIdx= 0;
+   uint16_t ranFuncId=0;
+   RanFunction *ranFuncDb = NULLP;
+   RicRequestId ricReqId;
+   DuDb    *duDb = NULLP;
+   RicSubscription *ricSubs = NULLP;
+   CmLList *ricSubsNode = NULLP;
+
+   SEARCH_DU_DB(duIdx, duId, duDb);
+   if(duDb == NULLP)
+   {
+      DU_LOG("\nERROR  -->  E2AP : duDb is not present for duId %d",duId);
+      return;
+   }
+
+   if(!ricSubsModificationRsp)
+   {
+      DU_LOG("\nERROR  -->  E2AP : ricSubsModificationRsp pointer is null");
+      return;
+   }
+
+   if(!ricSubsModificationRsp->protocolIEs.list.array)
+   {
+      DU_LOG("\nERROR  -->  E2AP : ricSubsModificationRsp array pointer is null");
+      return;
+   }
+
+   for(ieIdx=0; ieIdx < ricSubsModificationRsp->protocolIEs.list.count; ieIdx++)
+   {
+      if(ricSubsModificationRsp->protocolIEs.list.array[ieIdx])
+      {
+         switch(ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->id)
+         {
+            case ProtocolIE_IDE2_id_RICrequestID:
+               {
+                  ricReqId.requestorId = ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICrequestID.ricRequestorID;
+                  ricReqId.instanceId = ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICrequestID.ricInstanceID;
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RANfunctionID:
+               {
+                  ranFuncId = ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RANfunctionID;
+                  ranFuncDb = fetchRanFuncFromRanFuncId(duDb, ranFuncId);
+                  if(!ranFuncDb)
+                  {
+                     DU_LOG("\nERROR  -->  E2AP : Invalid Ran Function id %d received",ranFuncId);
+                     return;
+                  }
+
+                  ricSubs = fetchSubsInfoFromRicReqId(ricReqId, ranFuncDb, &ricSubsNode);
+                  if(!ricSubs)
+                  {
+                     DU_LOG("\nERROR  -->  E2AP : Ric subscription node is not present ");
+                     return;
+                  }
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RICactionsRemovedForModification_List:
+               {
+                  ProcessingRicSubsActionRemoved(&ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICactions_RemovedForModification_List, ricSubs);
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RICactionsFailedToBeRemovedForModification_List:
+               {
+                  ProcessingRicSubsActionFailedToBeRemoved(&ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICactions_FailedToBeRemovedForModification_List);
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RICactionsModifiedForModification_List:
+               {
+                  ProcessingRicSubsActionModified(&ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICactions_ModifiedForModification_List);
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RICactionsFailedToBeModifiedForModification_List:
+               {
+                  ProcessingRicSubsActionFailedToBeModified(&ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICactions_FailedToBeModifiedForModification_List);
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RICactionsAddedForModification_List:
+               {
+                  ProcessingRicSubsActionAdded(&ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICactions_AddedForModification_List);
+                  break;
+               }
+            case ProtocolIE_IDE2_id_RICactionsFailedToBeAddedForModification_List:
+               {
+                  ProcessingRicSubsActionFailedToBeAdded(&ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->value.choice.RICactions_FailedToBeAddedForModification_List, ricSubs);
+                  break;
+               }
+            default:
+               {
+                  DU_LOG("\nERROR  -->  E2AP : Received Invalid Ie [%ld]", ricSubsModificationRsp->protocolIEs.list.array[ieIdx]->id);
+                  break;
+               }
+         }
+      }
+   }
+}
+
 /*******************************************************************
 *
 * @brief Handles received E2AP message and sends back response  
@@ -8172,6 +8532,11 @@ void E2APMsgHdlr(uint32_t *duId, Buffer *mBuf)
                      ProcRicSubsDeleteRsp(*duId, &e2apMsg->choice.successfulOutcome->value.choice.RICsubscriptionDeleteResponse);
                      break;
                   }
+               case SuccessfulOutcomeE2__value_PR_RICsubscriptionModificationResponse:
+                  {
+                     ProcRicSubsModificationRsp(*duId, &e2apMsg->choice.successfulOutcome->value.choice.RICsubscriptionModificationResponse);
+                     break;
+                  }
                default:
                   {
                      DU_LOG("\nERROR  -->  E2AP : Invalid type of successfulOutcome message [%d]", \