Skip to content
Snippets Groups Projects
Commit 347e4330 authored by alexandresavard's avatar alexandresavard
Browse files

Fix thread destructor

parent 98c95e44
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ AudioRtp::~AudioRtp (void) {
int
AudioRtp::createNewSession (SIPCall *ca) {
ost::MutexLock m(_threadMutex);
// something should stop the thread before...
......@@ -87,6 +88,7 @@ AudioRtp::closeRtpSession () {
// This will make RTP threads finish.
// _debug("Stopping AudioRTP\n");
try {
delete _RTXThread; _RTXThread = 0;
} catch(...) {
_debugException("! ARTP Exception: when stopping audiortp\n");
......@@ -140,7 +142,7 @@ AudioRtpRTX::~AudioRtpRTX () {
_debugException("! ARTP: Thread destructor didn't terminate correctly");
throw;
}
//_debug("terminate audiortprtx ended...\n");
_debug("terminate audiortprtx ended...\n");
_ca = 0;
if (!_sym) {
delete _sessionRecv; _sessionRecv = NULL;
......@@ -159,6 +161,9 @@ AudioRtpRTX::~AudioRtpRTX () {
delete time; time = NULL;
delete converter; converter = NULL;
_debug("AudioRtpRTX::~AudioRtpRTX () : Deleting the call instance \n");
}
void
......
......@@ -210,6 +210,7 @@ SIPVoIPLink::terminate()
void
SIPVoIPLink::terminateSIPCall()
{
_debug("SIPVoIPLink::terminateSIPCall(): function called");
ost::MutexLock m(_callMapMutex);
CallMap::iterator iter = _callMap.begin();
SIPCall *call;
......@@ -477,7 +478,7 @@ SIPVoIPLink::hangup(const CallID& id)
return false;
call->getInvSession()->mod_data[getModId()] = NULL;
return true;
// Release RTP thread
if (Manager::instance().isCurrentCall(id)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment