[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jun 20 19:38:10 CDT 2012


branch "master" has been updated
       via  6e7550862734bf6d108911a01166eea7be92f587 (commit)
      from  fa10d8cd8919f61ab26756dd7cd6051d561673bd (commit)

Summary of changes:
 src/SIPSession.cpp |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 6e7550862734bf6d108911a01166eea7be92f587
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Jun 20 22:05:50 2012 -0230

    Refereneces to SIPSession objects end up getting kept in an operation context
    cache. When the cache prunes in a timer task it ends up cleaning up the
    SIPSession servant from an Ice internal timer thread, not a pjsip library
    registered one. This unfortunately results in a crash. The current workaround
    is to release the pool in the DestroyOperation. Of course... if the SIPSession
    goes away through other means, that could become problematic.

diff --git a/src/SIPSession.cpp b/src/SIPSession.cpp
index 77dfcb5..b9811f0 100755
--- a/src/SIPSession.cpp
+++ b/src/SIPSession.cpp
@@ -153,10 +153,6 @@ public:
 
     ~SIPSessionPriv()
     {
-        if (mSDPPool)
-        {
-            pj_pool_release(mSDPPool);
-        }
     }
 
 
@@ -422,6 +418,14 @@ public:
         }
     }
 
+    void destroyPool()
+    {
+        if (mSDPPool)
+        {
+            pj_pool_release(mSDPPool);
+        }
+    }
+
 private:
     static ReadOnlyCookieTypes mReadOnlyCookieTypes;
 
@@ -3346,6 +3350,7 @@ public:
             delete mInfo;
             mInfo = 0;
         }
+        mSessionPriv->destroyPool();
 
         return Complete;
     }

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list