Skip to content
Snippets Groups Projects
Commit 2abc0d2c authored by Alexandre Savard's avatar Alexandre Savard
Browse files

Merge branch 'fix_srtp' of git+ssh://git.sflphone.org/var/repos/sflphone/git/sflphone into fix_srtp

parents aadc235d 5bfe2bac
No related branches found
No related tags found
No related merge requests found
......@@ -51,8 +51,6 @@ AudioRtpFactory::AudioRtpFactory(SIPCall *ca) : rtpSession_(NULL),
AudioRtpFactory::~AudioRtpFactory()
{
delete rtpSession_;
delete cachedLocalContext_;
delete cachedRemoteContext_;
}
void AudioRtpFactory::initConfig()
......
......@@ -262,7 +262,7 @@ void AudioSrtpSession::initializeRemoteCryptoContext()
{
DEBUG("AudioSrtp: Initialize remote crypto context");
CryptoSuiteDefinition crypto = sfl::CryptoSuites[remoteCryptoSuite_];
const CryptoSuiteDefinition &crypto = sfl::CryptoSuites[remoteCryptoSuite_];
delete remoteCryptoCtx_;
remoteCryptoCtx_ = new ost::CryptoContext(0x0,
......@@ -285,7 +285,7 @@ void AudioSrtpSession::initializeLocalCryptoContext()
{
DEBUG("AudioSrtp: Initialize local crypto context");
CryptoSuiteDefinition crypto = sfl::CryptoSuites[localCryptoSuite_];
const CryptoSuiteDefinition &crypto = sfl::CryptoSuites[localCryptoSuite_];
delete localCryptoCtx_;
localCryptoCtx_ = new ost::CryptoContext(OutgoingDataQueue::getLocalSSRC(),
......@@ -306,10 +306,14 @@ void AudioSrtpSession::initializeLocalCryptoContext()
void AudioSrtpSession::restoreCryptoContext(ost::CryptoContext *localContext,
ost::CryptoContext *remoteContext)
{
delete remoteCryptoCtx_;
remoteCryptoCtx_ = remoteContext;
delete localCryptoCtx_;
localCryptoCtx_ = localContext;
if (remoteCryptoCtx_ != remoteContext) {
delete remoteCryptoCtx_;
remoteCryptoCtx_ = remoteContext;
}
if (localCryptoCtx_ != localContext) {
delete localCryptoCtx_;
localCryptoCtx_ = localContext;
}
setInQueueCryptoContext(remoteCryptoCtx_);
setOutQueueCryptoContext(localCryptoCtx_);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment