[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
Thu May 26 11:54:16 CDT 2011
branch "master" has been updated
via 50741df4192403a029c07a9348983023de1d8a3e (commit)
from 0e36a390c38355413afde6da286342f780a35a87 (commit)
Summary of changes:
src/SipSessionManagerApp.cpp | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
- Log -----------------------------------------------------------------
commit 50741df4192403a029c07a9348983023de1d8a3e
Author: Joshua Colp <jcolp at digium.com>
Date: Thu May 26 13:50:30 2011 -0300
Use a UUID for the configuration service so that IceStorm does not consider it already subscribed when other instances subscribe.
diff --git a/src/SipSessionManagerApp.cpp b/src/SipSessionManagerApp.cpp
index 44fcd59..861c3c2 100644
--- a/src/SipSessionManagerApp.cpp
+++ b/src/SipSessionManagerApp.cpp
@@ -122,6 +122,7 @@ private:
ReplicaPtr mReplicaService;
ComponentServicePtr mComponentService;
ConfigurationServicePtr mConfigurationService;
+ ConfigurationServicePrx mConfigurationServiceProxy;
PJSipManager *mPJSipManager;
SipStateReplicatorListenerPtr mReplicatorListener;
SipStateReplicatorListenerPrx mReplicatorListenerProxy;
@@ -137,7 +138,6 @@ private:
static const string ComponentServiceId("SipChannelComponent");
static const string EndpointLocatorObjectId("SipChannelEndpointLocator");
static const string ReplicaServiceId("SipChannelReplica");
-static const string ConfigurationServiceId("SipConfigurationService");
/**
* This class provides implementation for the ComponentService interface, which
@@ -301,10 +301,8 @@ void SipSessionManager::registerWithServiceLocator()
if (mCommunicator->getProperties()->getPropertyWithDefault("Sip.Standalone", "false") == "true")
{
// Publish the configuration service IceStorm topic so everybody gets configuration
- Ice::ObjectPrx configurationServicePrx =
- mLocalAdapter->createDirectProxy(mCommunicator->stringToIdentity(ConfigurationServiceId));
mConfigurationManagement = ServiceManagementPrx::uncheckedCast(
- mServiceLocatorManagement->addService(configurationServicePrx, ""));
+ mServiceLocatorManagement->addService(mConfigurationServiceProxy, ""));
// Populate the configuration parameters with details so we can be found
SipConfigurationParamsPtr configurationParams = new SipConfigurationParams();
@@ -406,13 +404,9 @@ void SipSessionManager::registerWithStateReplicator()
if (mCommunicator->getProperties()->getPropertyWithDefault("Rtp.Standalone", "false") == "false")
{
- Ice::ObjectPrx configurationServiceObjectPrx =
- mLocalAdapter->createDirectProxy(mCommunicator->stringToIdentity(ConfigurationServiceId));
- ConfigurationServicePrx configurationServicePrx = ConfigurationServicePrx::uncheckedCast(
- configurationServiceObjectPrx);
ConfigurationReplicatorPrx configurationReplicator = ConfigurationReplicatorPrx::checkedCast(
mStateReplicator.initialize(), ReplicatorFacet);
- configurationReplicator->registerConfigurationService(configurationServicePrx);
+ configurationReplicator->registerConfigurationService(mConfigurationServiceProxy);
}
if (mCommunicator->getProperties()->getPropertyWithDefault("Sip.StateReplicatorListener", "no") == "yes")
@@ -570,7 +564,8 @@ void SipSessionManager::initialize(const string& appName, const Ice::Communicato
// Create and publish our Configuration interface support.
mConfigurationService = createConfigurationServant(mPJSipManager, mEndpointFactory, mRoutingId, mRoutingServiceLocatorRegistry);
- mLocalAdapter->add(mConfigurationService, mCommunicator->stringToIdentity(ConfigurationServiceId));
+ mConfigurationServiceProxy = ConfigurationServicePrx::uncheckedCast(mLocalAdapter->addWithUUID(
+ mConfigurationService));
lg(Debug) << "Created SIP Configuration Implementation";
// Create and configure our Endpoint Locator.
-----------------------------------------------------------------------
--
asterisk-scf/release/sip.git
More information about the asterisk-scf-commits
mailing list