diff --git a/daemon/src/audio/audiortp/audio_srtp_session.cpp b/daemon/src/audio/audiortp/audio_srtp_session.cpp index b6c3d94df80815603025b6536d16e7f355f6d610..d8a6f6fd8fa77b4d06f77af017f45bc5684985ea 100644 --- a/daemon/src/audio/audiortp/audio_srtp_session.cpp +++ b/daemon/src/audio/audiortp/audio_srtp_session.cpp @@ -264,7 +264,8 @@ void AudioSrtpSession::initializeRemoteCryptoContext() const CryptoSuiteDefinition &crypto = sfl::CryptoSuites[remoteCryptoSuite_]; - delete remoteCryptoCtx_; + // delete this crypto context from the internal map + removeInQueueCryptoContext(remoteCryptoCtx_); remoteCryptoCtx_ = new ost::CryptoContext(0x0, 0, // roc, 0L, // keydr, @@ -287,7 +288,8 @@ void AudioSrtpSession::initializeLocalCryptoContext() const CryptoSuiteDefinition &crypto = sfl::CryptoSuites[localCryptoSuite_]; - delete localCryptoCtx_; + // delete this crypto context from the internal map + removeOutQueueCryptoContext(localCryptoCtx_); localCryptoCtx_ = new ost::CryptoContext(OutgoingDataQueue::getLocalSSRC(), 0, // roc, 0L, // keydr, @@ -307,11 +309,11 @@ void AudioSrtpSession::restoreCryptoContext(ost::CryptoContext *localContext, ost::CryptoContext *remoteContext) { if (remoteCryptoCtx_ != remoteContext) { - delete remoteCryptoCtx_; + removeInQueueCryptoContext(remoteCryptoCtx_); remoteCryptoCtx_ = remoteContext; } if (localCryptoCtx_ != localContext) { - delete localCryptoCtx_; + removeOutQueueCryptoContext(localCryptoCtx_); localCryptoCtx_ = localContext; } setInQueueCryptoContext(remoteCryptoCtx_); diff --git a/daemon/src/audio/pulseaudio/pulselayer.cpp b/daemon/src/audio/pulseaudio/pulselayer.cpp index a930f5a10997ec6684ee6f9662365607c9508b14..ec672a8ba6754af53cf68731cc18bdae1ddbd8fe 100644 --- a/daemon/src/audio/pulseaudio/pulselayer.cpp +++ b/daemon/src/audio/pulseaudio/pulselayer.cpp @@ -398,7 +398,7 @@ void PulseLayer::readFromMic() size_t bytes; if (pa_stream_peek(record_->pulseStream() , (const void**) &data , &bytes) < 0 or !data) { - ERROR("Audio: Error capture stream peek failed: %s" , pa_strerror(pa_context_errno(context_))); + // ERROR("Audio: Error capture stream peek failed: %s" , pa_strerror(pa_context_errno(context_))); return; } diff --git a/daemon/src/sip/sdp.cpp b/daemon/src/sip/sdp.cpp index 8fa3010bc0075fe67be38fd585440987b8fd2cc3..d38e6c42dff8a84af065a87210edd1bdf5b9b6e3 100644 --- a/daemon/src/sip/sdp.cpp +++ b/daemon/src/sip/sdp.cpp @@ -410,6 +410,7 @@ void Sdp::getRemoteSdpCryptoFromOffer(const pjmedia_sdp_session* remote_sdp, Cry pjmedia_sdp_attr *attribute = media->attr[j]; // @TODO our parser require the "a=crypto:" to be present + ERROR(" attribute %s", pj_strbuf(&attribute->name)); if (pj_stricmp2(&attribute->name, "crypto") == 0) crypto_offer.push_back("a=crypto:" + std::string(attribute->value.ptr, attribute->value.slen)); } diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index 1dc9c62250745c6e30371bd2f5ac8f2954b8f2dd..92fb85b364fc244374fd84c4d8948ff5f91d960e 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -1402,9 +1402,13 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status) Manager::instance().getDbusManager()->getCallManager()->secureSdesOn(call->getCallId()); } else { + ERROR("UserAgent: SDES negotiation failure"); Manager::instance().getDbusManager()->getCallManager()->secureSdesOff(call->getCallId()); } } + else { + DEBUG("UserAgent: No crypto offer available"); + } // We did not find any crypto context for this media, RTP fallback if (!nego_success && call->getAudioRtp().isSdesEnabled()) {