[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
Tue Jun 26 17:22:16 CDT 2012


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

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


- Log -----------------------------------------------------------------
commit 3a7e2976052fd0ba3c0e88a7b986d3f0881c3b2f
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Jun 26 17:20:49 2012 -0500

    Bump up reference count of the dialog on the pjsip callback thread so that the dialog is still around when we need it in the WorkQueue.

diff --git a/src/PJSIPSessionModule.cpp b/src/PJSIPSessionModule.cpp
index a223c74..bc009ae 100644
--- a/src/PJSIPSessionModule.cpp
+++ b/src/PJSIPSessionModule.cpp
@@ -1779,7 +1779,15 @@ class InviteStateOperation : public SIPQueueableOperation
 {
 public:
     InviteStateOperation(const PJSIPSessionModulePtr& module, pjsip_inv_session* inv, const int eventType, const int invState, const std::string branch)
-        : mSessionModule(module), mInv(inv), mEventType(eventType), mInvState(invState), mEventBranch(branch) { }
+        : mSessionModule(module), mInv(inv), mEventType(eventType), mInvState(invState), mEventBranch(branch) 
+    {
+        pjsip_dlg_inc_session(mInv->dlg, &mSessionModule->getModule());
+    }
+
+    ~InviteStateOperation()
+    {
+        pjsip_dlg_dec_session(mInv->dlg, &mSessionModule->getModule());
+    }
 
 protected:
     SuspendableWorkResult initial(const SuspendableWorkListenerPtr&)

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list