Skip to content
Snippets Groups Projects
Commit 9c4e7806 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

AudioRtpFactory::stop() cannot fail

parent 25beb37d
No related branches found
No related tags found
No related merge requests found
......@@ -158,25 +158,17 @@ void AudioRtpFactory::start (AudioCodec* audiocodec)
void AudioRtpFactory::stop (void)
{
ost::MutexLock mutex (_audioRtpThreadMutex);
_info ("AudioRtpFactory: Stopping audio rtp session");
if (_rtpSession == NULL) {
_debug ("AudioRtpFactory: Rtp session already deleted");
if (_rtpSession == NULL)
return;
}
try {
if (_rtpSession->getAudioRtpType() == Sdes) {
localContext = static_cast<AudioSrtpSession *> (_rtpSession)->_localCryptoCtx;
remoteContext = static_cast<AudioSrtpSession *> (_rtpSession)->_remoteCryptoCtx;
}
if (_rtpSession->getAudioRtpType() == Sdes) {
localContext = static_cast<AudioSrtpSession *> (_rtpSession)->_localCryptoCtx;
remoteContext = static_cast<AudioSrtpSession *> (_rtpSession)->_remoteCryptoCtx;
}
delete _rtpSession;
_rtpSession = NULL;
} catch (...) {
_debug ("AudioRtpFactory: Error: Exception caught when stopping the audio rtp session");
throw AudioRtpFactoryException ("AudioRtpFactory: Error: caught exception in AudioRtpFactory::stop");
}
delete _rtpSession;
_rtpSession = NULL;
}
int AudioRtpFactory::getSessionMedia()
......@@ -244,7 +236,7 @@ void AudioRtpFactory::setDtmfPayloadType(unsigned int payloadType)
void AudioRtpFactory::sendDtmfDigit (int digit)
{
_rtpSession->putDtmfEvent (digit);
_rtpSession->putDtmfEvent(digit);
}
}
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