[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "alternate_source_cleanup" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Jul 9 16:59:23 CDT 2012


branch "alternate_source_cleanup" has been updated
       via  c89be9b7c37e4f61b365d8e620b6dadf297462f8 (commit)
      from  696c728ff5cd8c3d3659e33ed492af68b4ae07ad (commit)

Summary of changes:
 src/RTPSession.cpp |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit c89be9b7c37e4f61b365d8e620b6dadf297462f8
Author: Brent Eagles <beagles at digium.com>
Date:   Mon Jul 9 19:29:09 2012 -0230

    Transport/endpoint order is pretty important. Fixed very basic crash.

diff --git a/src/RTPSession.cpp b/src/RTPSession.cpp
index 0e389a0..5c9e3bc 100644
--- a/src/RTPSession.cpp
+++ b/src/RTPSession.cpp
@@ -1237,15 +1237,23 @@ void RTPSessionImpl::destroy()
      */
     {
         boost::unique_lock<boost::shared_mutex> lock(mLock);
-        mStreamSource->destroy();
-        mStreamSink->destroy();
+        if (mStreamSource)
+        {
+            mStreamSource->destroy();
+        }
+        if (mStreamSink)
+        {
+            mStreamSink->destroy();
+        }
         mStreamSource = 0;
         mStreamSink = 0;
+        mReceiverReport = 0;
+        mSenderReport = 0;
 
         mSessionAdapter.reset();
-        mEndpoint.reset();
         mTransport.reset();
         mRtcpSessionInterface = 0;
+        mEndpoint.reset();
     }
 
     /* All we have to do is remove ourselves from the ASM, our smart pointerness will cause us to

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list