[asterisk-scf-commits] asterisk-scf/integration/servicediscovery.git branch "retry_deux" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Apr 30 12:28:49 CDT 2012
branch "retry_deux" has been updated
via d4e117296c1a778be8bdec551f6911577c3eb15e (commit)
from f9677e4b65bb86cf31058c423dcae52d47558990 (commit)
Summary of changes:
config/test_component.conf | 2 +-
src/ServiceLocator.cpp | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit d4e117296c1a778be8bdec551f6911577c3eb15e
Author: Ken Hunt <ken.hunt at digium.com>
Date: Mon Apr 30 12:27:50 2012 -0500
Corrected logic for .Standalone config property.
diff --git a/config/test_component.conf b/config/test_component.conf
index 7ea0784..76fa1ec 100644
--- a/config/test_component.conf
+++ b/config/test_component.conf
@@ -38,7 +38,7 @@ ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -h 127.0.0.1 -p 4413
# Configure ourselves as a master
-ServiceDiscovery.Standalone=no
+ServiceDiscovery.Standalone=yes
ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -h 127.0.0.1 -p 4421
ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -h 127.0.0.1 -p 4422:udp -h 127.0.0.1 -p 4422
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index ea37540..3165c6f 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -343,14 +343,16 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
if (getBooleanPropertyValueWithDefault(communicator->getProperties(), appName + ".Standalone", false))
{
+ lg(Info) << "Operating in an active state and pushing updates." << endl;
+ }
+ else
+ {
+ // The default state is standby, in a replica group.
+ // In this state, the component must be activated via it's Replica interface.
mReplicaService->standby(AsteriskSCF::Operations::createContext());
mStateReplicator->addListener(AsteriskSCF::Operations::createContext(), replicatorListenerProxy);
lg(Info) << "Operating as a standby replica." << endl;
}
- else
- {
- lg(Info) << "Operating in an active state and pushing updates." << endl;
- }
}
catch (const std::exception& e)
{
-----------------------------------------------------------------------
--
asterisk-scf/integration/servicediscovery.git
More information about the asterisk-scf-commits
mailing list