[asterisk-scf-commits] asterisk-scf/release/ice-util-cpp.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Sep 16 12:09:41 CDT 2011


branch "master" has been updated
       via  1f46a195dc0bf69cb6ea3e1d2a67874b1b2fb862 (commit)
      from  b07fa38a549385d8721eb51ff23ff1d2bc33f1fb (commit)

Summary of changes:
 include/AsteriskSCF/Component/Component.h |    3 +++
 src/Component/Component.cpp               |   12 ++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 1f46a195dc0bf69cb6ea3e1d2a67874b1b2fb862
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Fri Sep 16 12:09:00 2011 -0500

    Changes to the adapter names for config cleanup.

diff --git a/include/AsteriskSCF/Component/Component.h b/include/AsteriskSCF/Component/Component.h
index 5377bc8..a83b0f5 100644
--- a/include/AsteriskSCF/Component/Component.h
+++ b/include/AsteriskSCF/Component/Component.h
@@ -297,6 +297,9 @@ private:
     Ice::CommunicatorPtr mCommunicator;
     Ice::StringSeq mArgs;
 
+    std::string mServiceAdapterName;
+    std::string mBackplaneAdapterName;
+
     AsteriskSCF::System::Component::V1::ComponentServicePtr mComponentService;
     AsteriskSCF::System::Component::V1::ComponentServicePrx mComponentServicePrx;
     AsteriskSCF::Discovery::LocatorRegistrationWrapperPtr mComponentRegistration;
diff --git a/src/Component/Component.cpp b/src/Component/Component.cpp
index c584c57..3c0c055 100644
--- a/src/Component/Component.cpp
+++ b/src/Component/Component.cpp
@@ -578,15 +578,16 @@ void Component::createAdapters()
 {
     try
     {
+
         // Create the adapter that our functional services are published on.
         // If not specified in the config file at all, using "default" will choose a port 
         // number for us, avoiding the unconfigured adapter exception. 
-        mServiceAdapter = mCommunicator->createObjectAdapterWithEndpoints(mName,
-            mCommunicator->getProperties()->getPropertyWithDefault(mName + ".Endpoints", "default"));
+        mServiceAdapter = mCommunicator->createObjectAdapterWithEndpoints(mServiceAdapterName,
+            mCommunicator->getProperties()->getPropertyWithDefault(mServiceAdapterName + ".Endpoints", "default"));
 
         // Create an adapter for our backplane services. 
-        mBackplaneAdapter = mCommunicator->createObjectAdapterWithEndpoints(mName + ".Backplane",
-           mCommunicator->getProperties()->getPropertyWithDefault(mName + ".Backplane.Endpoints", "default"));
+        mBackplaneAdapter = mCommunicator->createObjectAdapterWithEndpoints(mBackplaneAdapterName,
+           mCommunicator->getProperties()->getPropertyWithDefault(mBackplaneAdapterName + ".Endpoints", "default"));
     }
     catch(const std::exception& e)
     {
@@ -862,6 +863,9 @@ void Component::start(const string& name,
 
     mServiceName = mCommunicator->getProperties()->getPropertyWithDefault(mName + ".ServiceName", "default");
     
+    mServiceAdapterName = mName + ".ServiceAdapter";
+    mBackplaneAdapterName = mName + ".BackplaneAdapter";
+
     if (!mInitialized)
     {
         initialize();

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


-- 
asterisk-scf/release/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list