[asterisk-scf-commits] asterisk-scf/release/media_operations_core.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Sep 19 14:19:20 CDT 2011
branch "master" has been updated
via 2f1f5f2b6a16000e46a51bc6b83f99e8b2c40dda (commit)
from ccb310e61f696d54ec43df4b074c1cf35ac1e148 (commit)
Summary of changes:
.../{test_component.config => test_component.conf} | 0
src/MediaOperationStateReplicatorApp.cpp | 18 ++++++++++--------
test/CMakeLists.txt | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
rename config/{test_component.config => test_component.conf} (100%)
- Log -----------------------------------------------------------------
commit 2f1f5f2b6a16000e46a51bc6b83f99e8b2c40dda
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Sep 19 16:25:22 2011 -0300
Make the media operations core component conform to the configuration file in the examples repo.
diff --git a/config/test_component.config b/config/test_component.conf
similarity index 100%
rename from config/test_component.config
rename to config/test_component.conf
diff --git a/src/MediaOperationStateReplicatorApp.cpp b/src/MediaOperationStateReplicatorApp.cpp
index ed01019..ed61e9e 100644
--- a/src/MediaOperationStateReplicatorApp.cpp
+++ b/src/MediaOperationStateReplicatorApp.cpp
@@ -52,7 +52,8 @@ public:
virtual void stop();
void createStateReplicator(const Ice::CommunicatorPtr& communicator);
- void registerWithServiceLocator(const Ice::CommunicatorPtr& communicator);
+ void registerWithServiceLocator(const Ice::CommunicatorPtr& communicator,
+ const std::string& appName);
ServiceLocatorManagementPrx mManagement;
Ice::ObjectAdapterPtr mAdapter;
@@ -65,7 +66,8 @@ void MediaOperationStateReplicatorService::createStateReplicator(const Ice::Comm
mAdapter->add(mReplicator, communicator->stringToIdentity(ReplicatorId));
}
-void MediaOperationStateReplicatorService::registerWithServiceLocator(const Ice::CommunicatorPtr& communicator)
+void MediaOperationStateReplicatorService::registerWithServiceLocator(const Ice::CommunicatorPtr& communicator,
+ const std::string& appName)
{
MediaOperationStateReplicatorPrx stateReplicatorProxy =
MediaOperationStateReplicatorPrx::uncheckedCast(mAdapter->createDirectProxy(communicator->stringToIdentity(ReplicatorId)));
@@ -74,21 +76,21 @@ void MediaOperationStateReplicatorService::registerWithServiceLocator(const Ice:
ServiceLocatorParamsPtr params = new ServiceLocatorParams();
params->category = StateReplicatorDiscoveryCategory;
- params->service = communicator->getProperties()->getPropertyWithDefault("MediaOperationStateReplicator.Service", "default");
- params->id = communicator->getProperties()->getPropertyWithDefault("MediaOperationStateReplicator.Name", "default");
+ params->service = communicator->getProperties()->getPropertyWithDefault(appName + ".ServiceName", "default");
+ params->id = appName;
serviceManagement->addLocatorParams(params, "");
}
void MediaOperationStateReplicatorService::start(
- const std::string&,
+ const std::string& appName,
const Ice::CommunicatorPtr& communicator,
const Ice::StringSeq&)
{
- mManagement = ServiceLocatorManagementPrx::checkedCast(communicator->propertyToProxy("ServiceLocatorManagementProxy"));
- mAdapter = communicator->createObjectAdapter("MediaOperationStateReplicatorAdapter");
+ mManagement = ServiceLocatorManagementPrx::checkedCast(communicator->propertyToProxy("LocatorServiceManagement.Proxy"));
+ mAdapter = communicator->createObjectAdapter(appName + ".Adapter");
createStateReplicator(communicator);
- registerWithServiceLocator(communicator);
+ registerWithServiceLocator(communicator, appName);
mAdapter->activate();
}
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 82b0a08..88140cb 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -10,7 +10,7 @@ astscf_component_add_boost_libraries(MediaOperationsCoreTest unit_test_framework
astscf_component_add_slice_collection_libraries(MediaOperationsCoreTest ASTSCF)
astscf_component_build_icebox(MediaOperationsCoreTest)
-astscf_test_icebox(MediaOperationsCoreTest config/test_component.config)
+astscf_test_icebox(MediaOperationsCoreTest config/test_component.conf)
target_link_libraries(MediaOperationsCoreTest astscf-ice-util-cpp)
pjproject_link(MediaOperationsCoreTest pjsip)
-----------------------------------------------------------------------
--
asterisk-scf/release/media_operations_core.git
More information about the asterisk-scf-commits
mailing list