From c1d75be834598e5938c46e49719db2093d07c213 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Wed, 27 May 2026 15:30:48 +0200 Subject: [PATCH] MT#59962 AmEvent: explicit define for event `0` `0` - means termination, so just use a define. Change-Id: Ibe398d81ebfcc7e751c2eb8aad455d2739cf3fcb --- core/AmEvent.h | 1 + core/AmRtpStream.h | 2 +- core/AmSession.cpp | 2 +- core/ampi/DiameterClientAPI.h | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/AmEvent.h b/core/AmEvent.h index ee4968c5..11756e7b 100644 --- a/core/AmEvent.h +++ b/core/AmEvent.h @@ -33,6 +33,7 @@ #include using std::string; +#define E_TERMINATE_LEG 0 #define E_PLUGIN 100 #define E_SYSTEM 101 #define E_SIP_SUBSCRIPTION 102 diff --git a/core/AmRtpStream.h b/core/AmRtpStream.h index 96902b22..d46b5b82 100644 --- a/core/AmRtpStream.h +++ b/core/AmRtpStream.h @@ -97,7 +97,7 @@ class AmRtpTimeoutEvent public: AmRtpTimeoutEvent() - : AmEvent(0) { } + : AmEvent(E_TERMINATE_LEG) { } ~AmRtpTimeoutEvent() { } }; diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 1b7fd1e1..ec57e57f 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -539,7 +539,7 @@ void AmSession::setStopped(bool wakeup) { onStop(); } if (wakeup) - AmSessionContainer::instance()->postEvent(getLocalTag(), new AmEvent(0)); + AmSessionContainer::instance()->postEvent(getLocalTag(), new AmEvent(E_TERMINATE_LEG)); } string AmSession::getAppParam(const string& param_name) const diff --git a/core/ampi/DiameterClientAPI.h b/core/ampi/DiameterClientAPI.h index ed55402b..907d161d 100644 --- a/core/ampi/DiameterClientAPI.h +++ b/core/ampi/DiameterClientAPI.h @@ -51,7 +51,7 @@ struct DiameterReplyEvent DiameterReplyEvent(unsigned int commandCode, unsigned int applicationId, AmArg avps) - : AmEvent(0), commandCode(commandCode), + : AmEvent(E_TERMINATE_LEG), commandCode(commandCode), applicationId(applicationId), avps(avps) { } };