[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "safe_construct_w_pool" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Aug 7 15:24:22 CDT 2012


branch "safe_construct_w_pool" has been updated
       via  df0edc0b3f42960b1fc2fd65ab19fb8b1f120406 (commit)
      from  3ee43d5514fc8a011b47fae23b3275c5ff5806ce (commit)

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


- Log -----------------------------------------------------------------
commit df0edc0b3f42960b1fc2fd65ab19fb8b1f120406
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Aug 7 17:53:37 2012 -0230

    Fix a race condition where the dialog may disappear while we are using it.

diff --git a/src/PJSIPSessionModule.cpp b/src/PJSIPSessionModule.cpp
index 5110b70..843cedf 100644
--- a/src/PJSIPSessionModule.cpp
+++ b/src/PJSIPSessionModule.cpp
@@ -442,7 +442,15 @@ public:
         mReplacedDialog(replacedDialog),
         mDestination(destination),
         mCallerID(callerID),
-        mRedirections(redirections) { }
+        mRedirections(redirections) 
+    { 
+        pjsip_dlg_inc_session(mInv->dlg, &mSessionModule->getModule());
+    }
+
+    ~SessionCreationOperation()
+    {
+        pjsip_dlg_dec_session(mInv->dlg, &mSessionModule->getModule());
+    }
 
 protected:
     SuspendableWorkResult initial(const SuspendableWorkListenerPtr&)

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list