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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Oct 26 13:21:28 CDT 2010


branch "master" has been updated
       via  826fb785a64ae94050ea18c3eab26d6bdba35e1a (commit)
      from  ca6c12c744e5b56c44de60ce576c84c75e77965a (commit)

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


- Log -----------------------------------------------------------------
commit 826fb785a64ae94050ea18c3eab26d6bdba35e1a
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Oct 26 14:19:28 2010 -0400

    Store the endpoint locator name for a slight performance improvement.

diff --git a/src/SipSessionManagerApp.cpp b/src/SipSessionManagerApp.cpp
index d5519f4..0f87e38 100644
--- a/src/SipSessionManagerApp.cpp
+++ b/src/SipSessionManagerApp.cpp
@@ -99,6 +99,8 @@ private:
    std::string mAppName;
    Ice::CommunicatorPtr mCommunicator;
 
+   std::string mRoutingId;
+
    // The global object adapter is for shared services that could be replicated from another server
    Ice::ObjectAdapterPtr mGlobalAdapter;
 
@@ -326,10 +328,10 @@ void SipSessionManager::registerWithRoutingService()
 
    mEndpointFactory->generateRoutingDestinations(destinations);
 
-   std::string routingId = mCommunicator->getProperties()->getPropertyWithDefault("Sip.RoutingId", "pjsip");
+   mRoutingId = mCommunicator->getProperties()->getPropertyWithDefault("Sip.RoutingId", "pjsip");
 
    EndpointLocatorPrx locator = EndpointLocatorPrx::uncheckedCast(mGlobalAdapter->createDirectProxy(mCommunicator->stringToIdentity(EndpointLocatorObjectId)));
-   mRoutingServiceLocatorRegistry->addEndpointLocator(routingId, destinations, locator);
+   mRoutingServiceLocatorRegistry->addEndpointLocator(mRoutingId, destinations, locator);
 }
 
 /**
@@ -337,7 +339,7 @@ void SipSessionManager::registerWithRoutingService()
  */
 void SipSessionManager::deregisterFromRoutingService()
 {
-   mRoutingServiceLocatorRegistry->removeEndpointLocator(mCommunicator->getProperties()->getPropertyWithDefault("Sip.RoutingId", "pjsip"));
+   mRoutingServiceLocatorRegistry->removeEndpointLocator(mRoutingId);
 }
 
 /**

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list