X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_e2ap_mgr.c;h=f813ef098d2ad24a3c8081b905236170412b4fa7;hb=7a8431f7dc43c83d2dd83a242924c1ee044e711a;hp=6bdbe58f90491e765e5811d645b3c2f61599c18f;hpb=345f36a57881a9b78819a8e0f37a45bc146c2e7a;p=o-du%2Fl2.git diff --git a/src/du_app/du_e2ap_mgr.c b/src/du_app/du_e2ap_mgr.c index 6bdbe58f9..f813ef098 100644 --- a/src/du_app/du_e2ap_mgr.c +++ b/src/du_app/du_e2ap_mgr.c @@ -640,6 +640,9 @@ uint8_t e2ProcStatsRsp(MacStatsRsp *statsRsp) } else { + /* Once RIC subscription is successful, mark the config action as unknown */ + ricSubscriptionInfo->action = CONFIG_UNKNOWN; + /* Start RIC Subscription reporting timer */ switch(ricSubscriptionInfo->eventTriggerDefinition.formatType) { @@ -1058,7 +1061,6 @@ void deleteMeasuredValueList(CmLListCp *measuredValueList) * @return void * * ****************************************************************/ - void deleteMeasurementInfoList(CmLListCp *measInfoList) { CmLList *measInfoNode = NULLP; @@ -1117,6 +1119,7 @@ void deleteActionSequence(ActionInfo *action) memset(action, 0, sizeof(ActionInfo)); action->actionId = -1; } + /****************************************************************** * * @brief Delete Ric subscription node @@ -1132,7 +1135,6 @@ void deleteActionSequence(ActionInfo *action) * @return void * * ****************************************************************/ - void deleteRicSubscriptionNode(CmLList *subscriptionNode) { uint8_t actionIdx=0; @@ -1174,8 +1176,6 @@ void deleteRicSubscriptionNode(CmLList *subscriptionNode) * @return void * * ****************************************************************/ - - void deleteRicSubscriptionList(CmLListCp *subscriptionList) { CmLList *subscriptionNode=NULLP; @@ -1190,6 +1190,53 @@ void deleteRicSubscriptionList(CmLListCp *subscriptionList) } } +/******************************************************************* + * + * @brief Find all RIC subscriptions to be deleted in all RAN + * Functions + * + * @details + * + * Function : fetchRicSubsToBeDeleted + * + * Functionality: Find all RIC subscriptions to be deleted in all + * RAN functions and store in a temporary list + * + * @parameter Temporary list to store subscriptions to be deleted + * @return void + * + ******************************************************************/ +void fetchRicSubsToBeDeleted(CmLListCp *ricSubsToBeDelList) +{ + uint16_t ranFuncIdx = 0; + CmLList *subsNode = NULLP; + CmLList *subsToDelNode = NULLP; + + for(ranFuncIdx = 0; ranFuncIdx < MAX_RAN_FUNCTION; ranFuncIdx++) + { + if(duCb.e2apDb.ranFunction[ranFuncIdx].id > 0) + { + CM_LLIST_FIRST_NODE(&duCb.e2apDb.ranFunction[ranFuncIdx].subscriptionList, subsNode); + while(subsNode) + { + if(((RicSubscription *)subsNode->node)->action == CONFIG_DEL) + { + DU_ALLOC(subsToDelNode, sizeof(CmLList)); + if(!subsToDelNode) + { + DU_LOG("\nERROR --> E2AP : %s: Memory allocation failure at %d", __func__, __LINE__); + return; + } + subsToDelNode->node = subsNode->node; + cmLListAdd2Tail(ricSubsToBeDelList, subsToDelNode); + } + subsToDelNode = NULLP; + subsNode = subsNode->next; + } + } + } +} + /********************************************************************** End of file **********************************************************************/