From 6a541f48f3eaea21f545cba303e6574bb412d6c6 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Thu, 20 Oct 2011 11:15:03 -0400
Subject: [PATCH] * #7245: fixed crasher in destructor of audio_zrtp_session

---
 daemon/src/audio/audiortp/audio_symmetric_rtp_session.h | 6 +-----
 daemon/src/audio/audiortp/audio_zrtp_session.cpp        | 8 +++++++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/daemon/src/audio/audiortp/audio_symmetric_rtp_session.h b/daemon/src/audio/audiortp/audio_symmetric_rtp_session.h
index 26fdcf5f46..25e6393da6 100644
--- a/daemon/src/audio/audiortp/audio_symmetric_rtp_session.h
+++ b/daemon/src/audio/audiortp/audio_symmetric_rtp_session.h
@@ -87,12 +87,8 @@ class AudioSymmetricRtpSession : public ost::TimerPort, public ost::SymmetricRTP
         };
         SpeexEchoCancel echoCanceller;
 
-    protected:
-
+    private:
         AudioRtpThread *rtpThread_;
-
-    public:
-        friend class AudioRtpThread;
 };
 
 }
diff --git a/daemon/src/audio/audiortp/audio_zrtp_session.cpp b/daemon/src/audio/audiortp/audio_zrtp_session.cpp
index 2f38308487..51da042eac 100644
--- a/daemon/src/audio/audiortp/audio_zrtp_session.cpp
+++ b/daemon/src/audio/audiortp/audio_zrtp_session.cpp
@@ -68,11 +68,17 @@ AudioZrtpSession::AudioZrtpSession(SIPCall * sipcall, const std::string& zidFile
 
 AudioZrtpSession::~AudioZrtpSession()
 {
+
+// tmatth:Oct 20 2011:FIXME:
+// This was crashing...seems like it's not necessary. Double check
+// with valgrind/helgrind
+#if 0
     try {
-        terminate();
+        ost::Thread::terminate();
     } catch (...) {
         throw;
     }
+#endif
 
     Manager::instance().getMainBuffer()->unBindAll(ca_->getCallId());
 }
-- 
GitLab