[hydra-commits] hydra/servicediscovery.git branch "master" updated.

Commits to the Hydra project code repositories hydra-commits at lists.digium.com
Thu Aug 5 08:38:18 CDT 2010


branch "master" has been updated
       via  0d57efb4e8d5daa87b7b69f766649813679762f8 (commit)
       via  118133429389c9029b23d1db9c81281d043f54ae (commit)
      from  235ed58525d8a576ae2923c08a31ef39b837e03d (commit)

Summary of changes:
 src/ServiceLocator.cpp           |   10 +++++-----
 src/ServiceLocatorManagement.cpp |   10 +++++++++-
 2 files changed, 14 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 0d57efb4e8d5daa87b7b69f766649813679762f8
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 10:53:54 2010 -0300

    Add a simple type to the front of some log messages to make it easy for the eventual conversion
    to an actual logging infrastructure.

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index eb3f124..ce614c7 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -91,7 +91,7 @@ Ice::ObjectProxySeq ServiceLocatorImpl::locateAll(const ServiceLocatorParamsPtr&
  */
 int ServiceLocatorApp::run(int argc, char* argv[])
 {
-	cout << "Initializing service discovery component" << endl;
+	cout << "[INFO] Initializing service discovery component" << endl;
 
 	/* Talk to the topic manager to either create or get the service discovery topic, configured or default */
 	IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(communicator()->propertyToProxy("TopicManager.Proxy"));
@@ -126,7 +126,7 @@ int ServiceLocatorApp::run(int argc, char* argv[])
 			cerr << "Oh snap! Race condition creating topic, aborting" << endl;
 			return 0;
 		}
-		cout << "Created service discovery event topic" << endl;
+		cout << "[INFO] Created service discovery event topic" << endl;
 	}
 
 	EventsPrx service_discovery_topic = EventsPrx::uncheckedCast(topic->getPublisher());
@@ -142,7 +142,7 @@ int ServiceLocatorApp::run(int argc, char* argv[])
 
 	management_adapter->activate();
 
-	cout << "Activated service discovery management." << endl;
+	cout << "[INFO] Activated service discovery management." << endl;
 
 	Ice::ObjectAdapterPtr discovery_adapter = communicator()->createObjectAdapter("ServiceLocatorAdapter");
 
@@ -152,9 +152,9 @@ int ServiceLocatorApp::run(int argc, char* argv[])
 
 	discovery_adapter->activate();
 
-	cout << "Activated service discovery." << endl;
+	cout << "[INFO] Activated service discovery." << endl;
 
-	cout << "Waiting for requests." << endl;
+	cout << "[INFO] Waiting for requests." << endl;
 
 	/* Now that management and discovery are active we just sit here waiting until we shutdown */
 	communicator()->waitForShutdown();

commit 118133429389c9029b23d1db9c81281d043f54ae
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 10:52:48 2010 -0300

    Don't explodeify if contact with a comparator goes south.

diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 40cc7f1..549e1cc 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -211,7 +211,15 @@ bool ServiceLocatorManagementImpl::isSupported(const string& compare_guid, const
 		return false;
 	}
 
-	return (comparator->second).isSupported(params);
+	try
+	{
+		return (comparator->second).isSupported(params);
+	}
+	catch (...)
+	{
+		cout << "[ERROR] An exception was raised when attempting to contact comparator " << compare_guid << "." << endl;
+		return false;
+	}
 }
 
 /**

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


-- 
hydra/servicediscovery.git




More information about the asterisk-scf-commits mailing list