X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fdu_app%2Fdu_sctp.c;h=efee2915db960ca44e68307d8aec3170f70cd89a;hb=e96cb439cd4a7a6f55e3fab7caed978e38bd62b4;hp=93cd7dc6b47a5a53b505c4f0460a67aa2f53ea0c;hpb=cdf2274ce07f8a5e066f1a49e92db156f1a92c66;p=o-du%2Fl2.git diff --git a/src/du_app/du_sctp.c b/src/du_app/du_sctp.c index 93cd7dc6b..efee2915d 100644 --- a/src/du_app/du_sctp.c +++ b/src/du_app/du_sctp.c @@ -571,7 +571,7 @@ void sendToDuApp(Buffer *mBuf, Event event) * RFAILED - failure * * ****************************************************************/ -uint8_t sctpNtfyHdlr(CmInetSctpNotification *ntfy, uint8_t *itfState) +uint8_t sctpNtfyHdlr(CmInetSctpNotification *ntfy, uint8_t *itfState, uint8_t interface) { Pst pst; @@ -617,10 +617,21 @@ uint8_t sctpNtfyHdlr(CmInetSctpNotification *ntfy, uint8_t *itfState) DU_LOG("\nINFO --> SCTP : Send Failed notification received\n"); break; case CM_INET_SCTP_SHUTDOWN_EVENT : /* peer socket gracefully closed */ - DU_LOG("\nINFO --> SCTP : Shutdown Event notification received\n"); - *itfState = DU_SCTP_DOWN; - exit(0); - break; + { + DU_LOG("\nINFO --> SCTP : Shutdown Event notification received\n"); + *itfState = DU_SCTP_DOWN; + switch(interface) + { + case F1_INTERFACE: + break; + case E2_INTERFACE: + removeE2NodeInformation(); + break; + default: + exit(0); + } + break; + } case CM_INET_SCTP_ADAPTATION_INDICATION : DU_LOG("\nINFO --> SCTP : Adaptation Indication received\n"); break; @@ -707,13 +718,13 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32 { f1Params.assocId = pollParams->ntfy.u.assocChange.assocId; DU_LOG("\nDEBUG --> SCTP : AssocId assigned to F1Params from PollParams [%d]\n", f1Params.assocId); - ret = sctpNtfyHdlr(&pollParams->ntfy, &f1Params.itfState); + ret = sctpNtfyHdlr(&pollParams->ntfy, &f1Params.itfState, F1_INTERFACE); } else if(pollParams->port == ricParams.destPort) { ricParams.assocId = pollParams->ntfy.u.assocChange.assocId; DU_LOG("\nDEBUG --> SCTP : AssocId assigned to ricParams from PollParams [%d]\n", ricParams.assocId); - ret = sctpNtfyHdlr(&pollParams->ntfy, &ricParams.itfState); + ret = sctpNtfyHdlr(&pollParams->ntfy, &ricParams.itfState, E2_INTERFACE); } else {