Commit 9c4e7806 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

AudioRtpFactory::stop() cannot fail

parent 25beb37d
...@@ -158,25 +158,17 @@ void AudioRtpFactory::start (AudioCodec* audiocodec) ...@@ -158,25 +158,17 @@ void AudioRtpFactory::start (AudioCodec* audiocodec)
void AudioRtpFactory::stop (void) void AudioRtpFactory::stop (void)
{ {
ost::MutexLock mutex (_audioRtpThreadMutex); ost::MutexLock mutex (_audioRtpThreadMutex);
_info ("AudioRtpFactory: Stopping audio rtp session");
if (_rtpSession == NULL) { if (_rtpSession == NULL)
_debug ("AudioRtpFactory: Rtp session already deleted");
return; return;
}
try { if (_rtpSession->getAudioRtpType() == Sdes) {
if (_rtpSession->getAudioRtpType() == Sdes) { localContext = static_cast<AudioSrtpSession *> (_rtpSession)->_localCryptoCtx;
localContext = static_cast<AudioSrtpSession *> (_rtpSession)->_localCryptoCtx; remoteContext = static_cast<AudioSrtpSession *> (_rtpSession)->_remoteCryptoCtx;
remoteContext = static_cast<AudioSrtpSession *> (_rtpSession)->_remoteCryptoCtx; }
}
delete _rtpSession; delete _rtpSession;
_rtpSession = NULL; _rtpSession = NULL;
} catch (...) {
_debug ("AudioRtpFactory: Error: Exception caught when stopping the audio rtp session");
throw AudioRtpFactoryException ("AudioRtpFactory: Error: caught exception in AudioRtpFactory::stop");
}
} }
int AudioRtpFactory::getSessionMedia() int AudioRtpFactory::getSessionMedia()
...@@ -244,7 +236,7 @@ void AudioRtpFactory::setDtmfPayloadType(unsigned int payloadType) ...@@ -244,7 +236,7 @@ void AudioRtpFactory::setDtmfPayloadType(unsigned int payloadType)
void AudioRtpFactory::sendDtmfDigit (int digit) void AudioRtpFactory::sendDtmfDigit (int digit)
{ {
_rtpSession->putDtmfEvent (digit); _rtpSession->putDtmfEvent(digit);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment