[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "locate-with-id" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jun 28 20:51:55 CDT 2011


branch "locate-with-id" has been created
        at  b4626b38671d82684747ed1de58cad81b635581c (commit)

- Log -----------------------------------------------------------------
commit b4626b38671d82684747ed1de58cad81b635581c
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Jun 28 20:51:24 2011 -0500

    Mods for changes to ServiceLocatorParams.

diff --git a/config/test_bridging.conf b/config/test_bridging.conf
index e88f751..a66e867 100644
--- a/config/test_bridging.conf
+++ b/config/test_bridging.conf
@@ -9,6 +9,8 @@
 #
 Ice.Default.CollocationOptimized=0
 
+Ice.Override.Timeout=5000
+
 #
 # We use a single file for configuration.
 #
diff --git a/src/BridgeListenerMgr.h b/src/BridgeListenerMgr.h
index 5c31156..d5a39d9 100644
--- a/src/BridgeListenerMgr.h
+++ b/src/BridgeListenerMgr.h
@@ -40,5 +40,6 @@ private:
 };
 
 typedef IceUtil::Handle<BridgeListenerMgr> BridgeListenerMgrPtr;
+
 } // End of namespace BridgeService
 } // End of namespace AsteriskSCF
diff --git a/src/BridgeReplicatorIf.ice b/src/BridgeReplicatorIf.ice
index 1d3e1b8..7d4b4ee 100644
--- a/src/BridgeReplicatorIf.ice
+++ b/src/BridgeReplicatorIf.ice
@@ -60,16 +60,6 @@ sequence<ReplicatedStateItem> ReplicatedStateItemSeq;
 
 /**
  *
- * TODO: Use!
- *
- */
-unsliceable class BridgeStateReplicatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
-{
-    string name;
-};
-
-/**
- *
  * MediaOperationReplicationPolicy indicates whether proxies to media
  * operations should be replicated along with the media sessions or media
  * sessions only are replicated. If only the media sessions are replicated,
diff --git a/src/BridgeReplicatorService.cpp b/src/BridgeReplicatorService.cpp
index 6bda816..952189a 100644
--- a/src/BridgeReplicatorService.cpp
+++ b/src/BridgeReplicatorService.cpp
@@ -141,9 +141,13 @@ void BridgeReplicatorApp::start(const string& name, const Ice::CommunicatorPtr&
     bool registered = false;
     try
     {
-        BridgeStateReplicatorParamsPtr locatorParameters = new BridgeStateReplicatorParams;
+        std::string serviceName = communicator->getProperties()->getPropertyWithDefault(
+          name + ".ServiceName", "default");
+
+        ServiceLocatorParamsPtr locatorParameters = new ServiceLocatorParams;
         locatorParameters->category = StateReplicatorDiscoveryCategory;
-        locatorParameters->name = communicator->getProperties()->getPropertyWithDefault(name + ".ReplicatorName", "default");
+        locatorParameters->service = serviceName;
+        locatorParameters->id = communicator->getProperties()->getPropertyWithDefault(name + ".ReplicatorName", "default");
         mLocator = new LocatorRegistrationWrapper<ReplicatorPrx>(communicator, property, replicatorPrx, adapterName, 
           locatorParameters);
         registered = mLocator->registerService();
diff --git a/src/Service.cpp b/src/Service.cpp
index fd3fcd6..408fff1 100644
--- a/src/Service.cpp
+++ b/src/Service.cpp
@@ -216,9 +216,13 @@ void BridgingApp::start(const std::string& name, const Ice::CommunicatorPtr& com
     
     ServiceLocatorPrx locator = ServiceLocatorPrx::checkedCast(communicator->stringToProxy(locatorPropertyString));
        
-    BridgeStateReplicatorParamsPtr searchParams = new BridgeStateReplicatorParams;
+    std::string replicatorServiceName = communicator->getProperties()->getPropertyWithDefault(
+               "Bridge.StateReplicatorService", "default");
+
+    ServiceLocatorParamsPtr searchParams = new ServiceLocatorParams;
     searchParams->category = StateReplicatorDiscoveryCategory;
-    searchParams->name = communicator->getProperties()->getPropertyWithDefault("Bridge.StateReplicatorName", "default");
+    searchParams->service = replicatorServiceName;
+    searchParams->id = communicator->getProperties()->getPropertyWithDefault("Bridge.StateReplicatorId", "default");
   
     ReplicatorSmartPrx replicator;
     try
@@ -277,8 +281,13 @@ void BridgingApp::start(const std::string& name, const Ice::CommunicatorPtr& com
     bool registered = false;
     try
     {
+        std::string serviceName = communicator->getProperties()->getPropertyWithDefault(
+               adapterName + ".Service", "default");
+
         ServiceLocatorParamsPtr parameters(new ServiceLocatorParams);
         parameters->category = BridgeServiceDiscoveryCategory;
+        parameters->service = serviceName;
+        parameters->id = adapterName;
         mLocator = 
             new LocatorRegistrationWrapper<BridgeManagerPrx>(communicator, serviceLocatorManagementProperty, bridgeManagerPrx, 
                adapterName, parameters);

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list