From 6b7b086bf78a70436d256842b74182906c996254 Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Sat, 23 Aug 2025 14:28:58 +0300 Subject: [PATCH] - minor progress in SRTP updates --- src/engine/endpoint/EP_AudioProvider.cpp | 4 ++-- src/engine/endpoint/EP_AudioProvider.h | 2 +- src/engine/media/MT_SrtpHelper.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/endpoint/EP_AudioProvider.cpp b/src/engine/endpoint/EP_AudioProvider.cpp index 8b41c8a3..00a0bdc4 100644 --- a/src/engine/endpoint/EP_AudioProvider.cpp +++ b/src/engine/endpoint/EP_AudioProvider.cpp @@ -348,8 +348,8 @@ SrtpSuite AudioProvider::processCryptoAttribute(const resip::Data& value, ByteBu if (strcmp(suite, SRTP_SUITE_NAME_1) == 0) result = SRTP_AES_128_AUTH_80; else - if (strcmp(suite, SRTP_SUITE_NAME_2) == 0) - result = SRTP_AES_256_AUTH_80; + if (strcmp(suite, SRTP_SUITE_NAME_2) == 0) + result = SRTP_AES_256_AUTH_80; return result; } diff --git a/src/engine/endpoint/EP_AudioProvider.h b/src/engine/endpoint/EP_AudioProvider.h index 7e87e462..6c81dbf0 100644 --- a/src/engine/endpoint/EP_AudioProvider.h +++ b/src/engine/endpoint/EP_AudioProvider.h @@ -74,6 +74,7 @@ public: void setupMirror(bool enable); void configureMediaObserver(MT::Stream::MediaObserver* observer, void* userTag); + static SrtpSuite processCryptoAttribute(const resip::Data& value, ByteBuffer& key); protected: // SDP's stream name @@ -109,7 +110,6 @@ protected: void* mMediaObserverTag = nullptr; std::string createCryptoAttribute(SrtpSuite suite); - SrtpSuite processCryptoAttribute(const resip::Data& value, ByteBuffer& key); void findRfc2833(const resip::SdpContents::Session::Medium::CodecContainer& codecs); // Implements setState() logic. This allows to be called from constructor (it is not virtual function) diff --git a/src/engine/media/MT_SrtpHelper.cpp b/src/engine/media/MT_SrtpHelper.cpp index ffdb9f7b..6daf298b 100644 --- a/src/engine/media/MT_SrtpHelper.cpp +++ b/src/engine/media/MT_SrtpHelper.cpp @@ -154,13 +154,13 @@ void SrtpSession::close() if (mOutboundSession) { srtp_dealloc(mOutboundSession); - mOutboundSession = NULL; + mOutboundSession = nullptr; } if (mInboundSession) { srtp_dealloc(mInboundSession); - mInboundSession = NULL; + mInboundSession = nullptr; } }