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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Nov 16 17:17:16 CST 2010


branch "ami-route" has been updated
       via  390e088c122ac31e79531fa887db0e5989662aa5 (commit)
      from  b98a7cf0216ccd1744ad524fd7241b2fc48772c9 (commit)

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


- Log -----------------------------------------------------------------
commit 390e088c122ac31e79531fa887db0e5989662aa5
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Nov 16 17:20:10 2010 -0600

    Create the PJSipManager before creating our communicator.
    
    This ensures that pjlib is initialized prior to our threadhook being called.
    Otherwise, client-side threads (used in AMI callbacks) will not be registered
    with pjlib properly because the initialization would wipe them out.

diff --git a/src/SipSessionManagerApp.cpp b/src/SipSessionManagerApp.cpp
index 239fa42..fe93dcf 100644
--- a/src/SipSessionManagerApp.cpp
+++ b/src/SipSessionManagerApp.cpp
@@ -488,6 +488,10 @@ void SipSessionManager::initialize(const std::string appName, const Ice::Communi
     {
         mAppName = appName;
 
+        // Initialize PJSIP
+        mPJSipManager = new PJSipManager(ic->getProperties());
+        lg(Debug) << "Created PJSIP manager";
+
         //As nice as it is of IceBox to provide us with a communicator,
         //we're going to create our own so that we can provide it with a threadhook.
         //Yes, this could be done via a plugin, but this is easier. Go away.
@@ -497,10 +501,6 @@ void SipSessionManager::initialize(const std::string appName, const Ice::Communi
 
         mCommunicator = Ice::initialize(id);
 
-        // Initialize PJSIP
-        mPJSipManager = new PJSipManager(mCommunicator->getProperties());
-        lg(Debug) << "Created PJSIP manager";
-
         // Create the global adapter.
         mGlobalAdapter = mCommunicator->createObjectAdapter("SipSessionManagerAdapter");
         lg(Debug) << "Created global object adapter";

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list