[asterisk-scf-commits] asterisk-scf/release/logger.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Oct 4 12:04:45 CDT 2011


branch "master" has been updated
       via  b9435b7ce538e1c33da69c395491e8c0f9e51324 (commit)
      from  9e2737daf979bf41d41c9d655bcce026c94e2c8f (commit)

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


- Log -----------------------------------------------------------------
commit b9435b7ce538e1c33da69c395491e8c0f9e51324
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Oct 4 12:04:19 2011 -0500

    Fixed potential for null pointer exception.

diff --git a/client/src/IceLogger.cpp b/client/src/IceLogger.cpp
index 87d85ae..ca1a7f7 100644
--- a/client/src/IceLogger.cpp
+++ b/client/src/IceLogger.cpp
@@ -242,10 +242,10 @@ ConfiguredIceLoggerPtr AsteriskSCF::System::Logging::createIceLogger(
             e.what() << '\n';
     }
 
-    // ServiceLocator used AMD, which won't work with collocation optimization
     ServiceLocatorPrx locator = ServiceLocatorPrx::uncheckedCast(
-        communicator->propertyToProxy("LocatorService.Proxy")
-            ->ice_collocationOptimized(false));
+          communicator->stringToProxy(communicator->getProperties()->getPropertyWithDefault(
+          "LocatorService.Proxy", "LocatorService:default -p 4411")));
+
     // if the LocatorService.Proxy isn't set, we'll log a message, but proceed
     // on in ignorance.  we'll basically build an IceLogger that can never
     // log to a LoggerServer because it can never find it.
@@ -254,6 +254,11 @@ ConfiguredIceLoggerPtr AsteriskSCF::System::Logging::createIceLogger(
         std::clog << "(Logger) LocatorService.Proxy not set.  Cannot find "
                   << LoggingServerGuid << '\n';
     }
+    else
+    {
+        // ServiceLocator uses AMD, which won't work with collocation optimization
+        locator->ice_collocationOptimized(false);
+    }
 
     ConfiguredIceLoggerPtr logger = ConfiguredIceLogger::create(locator, serviceName);
     Ice::ObjectPrx proxy = adapter->addWithUUID(logger);

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


-- 
asterisk-scf/release/logger.git



More information about the asterisk-scf-commits mailing list