X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_e2ap_mgr.c;h=eabc0d6b2972908be725bdafa21b9eec01165eb8;hb=c371a26d48604a5d60686d9ca347e68671e69637;hp=ed0d8187c703dee0f1b06bb311d2c7a1c622a535;hpb=6dc8a4c17da24847b3a3aee91b37151f77a8a5bc;p=o-du%2Fl2.git diff --git a/src/du_app/du_e2ap_mgr.c b/src/du_app/du_e2ap_mgr.c index ed0d8187c..eabc0d6b2 100644 --- a/src/du_app/du_e2ap_mgr.c +++ b/src/du_app/du_e2ap_mgr.c @@ -1494,24 +1494,40 @@ uint8_t e2ProcStatsDeleteRsp(MacStatsDeleteRsp *statsDeleteRsp) * in statistics delete response */ if(fetchSubsInfoFromSubsId(statsDeleteRsp->subscriptionId, &ranFuncDb, &ricSubscriptionNode, &ricSubscriptionInfo) != ROK) { - DU_LOG("\nERROR --> E2AP : extractStatsMeasurement: Failed to fetch subscriprtion details"); + DU_LOG("\nERROR --> E2AP : e2ProcStatsDeleteRsp: Failed to fetch subscriprtion details"); return RFAILED; } deleteRicSubscriptionNode(ricSubscriptionNode); -#if 0 - /* TODO */ - if(statsDeleteRsp->result == MAC_DU_APP_RSP_NOK && statsDeleteRsp->status == STATS_ID_NOT_FOUND) + + if(statsDeleteRsp->result == MAC_DU_APP_RSP_NOK) { - failureCause->causeType =E2_RIC_REQUEST; - failureCause->cause = E2_REQUEST_INFORMATION_UNAVAILABLE; - BuildAndSendRicSubscriptionDeleteFailure(ricSubscriptionInfo->ranFuncId, ricSubscriptionInfo->requestId, failureCause); + if(statsDeleteRsp->status == STATS_ID_NOT_FOUND) + { + failureCause.causeType =E2_RIC_REQUEST; + failureCause.cause = E2_REQUEST_INFORMATION_UNAVAILABLE; + } + else + { + failureCause.causeType = E2_MISCELLANEOUS; + failureCause.cause = E2_MISCELLANEOUS_CAUSE_UNSPECIFIED; + } + + if(BuildAndSendRicSubscriptionDeleteFailure(ricSubscriptionInfo->ranFuncId, ricSubscriptionInfo->requestId, failureCause) != ROK) + { + DU_LOG("\nERROR --> E2AP : e2ProcStatsDeleteRsp: failed to build and send ric subs delete failure"); + return RFAILED; + } } else { - BuildAndSendRicSubscriptionDeleteResponse(ricSubscriptionInfo->ranFuncId, ricSubscriptionInfo->requestId); + if(BuildAndSendRicSubscriptionDeleteResponse(ricSubscriptionInfo->ranFuncId, ricSubscriptionInfo->requestId) != ROK) + { + DU_LOG("\nERROR --> E2AP : e2ProcStatsDeleteRsp: failed to build and send ric subs delete rsp"); + return RFAILED; + } } -#endif + return ROK; }