[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 Dec 3 10:04:28 CST 2010


branch "master" has been updated
       via  6c28b354ea95d1722f3643320a3d4054913844fb (commit)
       via  cf5c0c056f8b62c126dea4087f4c3003e77d08e7 (commit)
       via  3f5e6b9888e8a75d3846f191c7cc0cc03a1c59b3 (commit)
       via  c64f60676cb2cab9f7c94e159a4a3af577e24d1e (commit)
       via  016cc138f828cff40f81a2f45247a3de9351886e (commit)
       via  9719909659c73691c43007c173a12d193b5927f9 (commit)
       via  f2da511f5e9c516626fb788254ee3c83d4df1a58 (commit)
       via  f5e31dfba81ff92cec22ba81e36ff333afd38fa4 (commit)
       via  909b2ff2d9b7796c1533718af692fe3cd2d69e01 (commit)
      from  fedbf5bc207cfbf4b46b4a3f890793568bb07b69 (commit)

Summary of changes:
 CMakeLists.txt                                     |    2 +-
 ProxyWrapper/src/CMakeLists.txt                    |   19 --
 ProxyWrapper/src/ProxyWrapper.h                    |  149 ---------------
 {ProxyWrapper => SmartProxy}/CMakeLists.txt        |    0
 SmartProxy/src/CMakeLists.txt                      |   25 +++
 .../src/SmartProxy.cpp                             |    2 +-
 SmartProxy/src/SmartProxy.h                        |  201 ++++++++++++++++++++
 7 files changed, 228 insertions(+), 170 deletions(-)
 delete mode 100644 ProxyWrapper/src/CMakeLists.txt
 delete mode 100644 ProxyWrapper/src/ProxyWrapper.h
 rename {ProxyWrapper => SmartProxy}/CMakeLists.txt (100%)
 create mode 100644 SmartProxy/src/CMakeLists.txt
 rename ProxyWrapper/src/ProxyWrapper.cpp => SmartProxy/src/SmartProxy.cpp (96%)
 create mode 100644 SmartProxy/src/SmartProxy.h


- Log -----------------------------------------------------------------
commit 6c28b354ea95d1722f3643320a3d4054913844fb
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 16:26:28 2010 -0600

    Making SmartProxy thread safe.
    
    See CR-ASTSCF-1.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index 6af5aba..e0443c9 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -18,6 +18,7 @@
 #include <iostream>
 
 #include <Ice/Ice.h>
+#include <IceUtil/Mutex.h>
 
 #include "Core/Discovery/ServiceLocatorIf.h"
 #include "logger.h"
@@ -68,6 +69,7 @@ public:
 
     P& operator->()
     {
+        // everything this calls is thread safe.  no need to lock.
         assert(mServiceLocator && mLocatorParams);
 
         if (!initializeOnce())
@@ -80,6 +82,8 @@ public:
 
     SmartProxy &operator=(const SmartProxy &rhs)
     {
+        // copy is thread safe.  no need to lock.
+
         // Boo to self-assignment
         if (this == &rhs)
         {
@@ -91,11 +95,13 @@ public:
 
     operator void*() const
     {
+        // mProxy itself is thread safe.  no need to lock
         return mProxy ? (void *)1 : 0;
     }
 
     bool isInitialized() const
     {
+        // mProxy itself is thread safe.  no need to lock
         return mProxy != 0;
     }
 
@@ -106,6 +112,9 @@ private:
      */
     void initialize()
     {
+        // thread safe
+        IceUtil::Mutex::Lock myLock(mMutex);
+
         using namespace AsteriskSCF::System::Logging;
         if (!mServiceLocator)
         {
@@ -156,6 +165,7 @@ private:
      */
     bool initializeOnce()
     {
+        // isInitialized() and initialize() are thread safe.  no need to lock
         if (isInitialized())
         {
             return true;
@@ -168,12 +178,18 @@ private:
 
     void copy(const SmartProxy &rhs)
     {
+        // thread safe
+        IceUtil::Mutex::Lock myLock(mMutex);
+        IceUtil::Mutex::Lock rhsLock(rhs.mMutex);
+
         mProxy = rhs.mProxy;
         mServiceLocator = rhs.mServiceLocator;
         mLocatorParams = rhs.mLocatorParams;
         mLogger = rhs.mLogger;
     }
 
+    // we want to lock even const instances, so mMutex must be mutable
+    mutable IceUtil::Mutex mMutex;
     P mProxy;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx mServiceLocator;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr mLocatorParams;

commit cf5c0c056f8b62c126dea4087f4c3003e77d08e7
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 16:20:47 2010 -0600

    A little const correctness.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index e295bbb..6af5aba 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -94,7 +94,7 @@ public:
         return mProxy ? (void *)1 : 0;
     }
 
-    bool isInitialized()
+    bool isInitialized() const
     {
         return mProxy != 0;
     }

commit 3f5e6b9888e8a75d3846f191c7cc0cc03a1c59b3
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 15:28:33 2010 -0600

    Added some additional null checks.
    
    See CR-ASTSCF-1.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index 36597f7..e295bbb 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -57,6 +57,12 @@ public:
         AsteriskSCF::System::Logging::Logger const &lg)
         :  mServiceLocator(locator), mLocatorParams(params), mLogger(&lg)
     {
+        using namespace AsteriskSCF::System::Logging;
+        if (!mLocatorParams)
+        {
+            lg(Error) << "Cannot find service with null parameters";
+            throw AsteriskSCF::Core::Discovery::V1::ServiceNotFound();
+        }
         initialize();
     }
 
@@ -108,6 +114,16 @@ private:
             return;
         }
 
+        // all paths to set mServiceLocator also set mLogger.
+        // but just in case things change in the future...
+        assert(mLogger);
+
+        if (!mLocatorParams)
+        {
+            (*mLogger)(Error) << "Cannot find service with null parameters";
+            return;
+        }
+
         try
         {
             // Use the locator to find the Proxy

commit c64f60676cb2cab9f7c94e159a4a3af577e24d1e
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 15:27:32 2010 -0600

    Removed exception specification.  Old Java habits die hard.
    
    See CR-ASTSCF-1.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index 550425b..36597f7 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -60,7 +60,7 @@ public:
         initialize();
     }
 
-    P& operator->() throw (AsteriskSCF::Core::Discovery::V1::ServiceNotFound)
+    P& operator->()
     {
         assert(mServiceLocator && mLocatorParams);
 

commit 016cc138f828cff40f81a2f45247a3de9351886e
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 14:50:34 2010 -0600

    Pass Ptr by reference instead of by value.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index 71c5856..550425b 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -53,7 +53,7 @@ public:
 
     SmartProxy(
         const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator,
-        AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params,
+        const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params,
         AsteriskSCF::System::Logging::Logger const &lg)
         :  mServiceLocator(locator), mLocatorParams(params), mLogger(&lg)
     {

commit 9719909659c73691c43007c173a12d193b5927f9
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 12:53:34 2010 -0600

    mLg -> mLogger
    
    The mLg name was carried over from the use of lg as the Logger name when
    it's a file scoped variable.  But given the scope of this member
    variable, mLogger is more appropriate.
    See CR-ASTSCF-1.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index d141d95..71c5856 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -44,17 +44,18 @@ template <class P>
 class SmartProxy
 {
 public:
-    SmartProxy() : mServiceLocator(0), mLocatorParams(0), mLg(0) {}
+    SmartProxy() : mServiceLocator(0), mLocatorParams(0), mLogger(0) {}
 
     SmartProxy(const SmartProxy &rhs)
     {
         copy(rhs);
     }
 
-    SmartProxy(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator,
+    SmartProxy(
+        const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator,
         AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params,
         AsteriskSCF::System::Logging::Logger const &lg)
-        :  mServiceLocator(locator), mLocatorParams(params), mLg(&lg)
+        :  mServiceLocator(locator), mLocatorParams(params), mLogger(&lg)
     {
         initialize();
     }
@@ -94,7 +95,8 @@ public:
 
 private:
     /**
-     * Initialization. Primarily involves acquring access to specific IceStorm topic.
+     * Initialization. Primarily involves acquring access to specific IceStorm
+     * topic.
      */
     void initialize()
     {
@@ -113,18 +115,20 @@ private:
             mProxy = P::checkedCast(obj);
             if (obj && !mProxy)
             {
-                (*mLg)(Error) << "Object (" << obj->ice_toString() << ") isn't of expected type";
+                (*mLogger)(Error) << "Object (" << obj->ice_toString()
+                                  << ") isn't of expected type";
             }
         }
         catch (const Ice::Exception &e)
         {
-            (*mLg)(Error) << "Exception locating " << mLocatorParams->category << ": " << e.what();
+            (*mLogger)(Error) << "Exception locating "
+                              << mLocatorParams->category << ": " << e.what();
             return;
         }
 
         if (mProxy == 0)
         {
-            (*mLg)(Error) << "Unable to locate " << mLocatorParams->category;
+            (*mLogger)(Error) << "Unable to locate " << mLocatorParams->category;
         }
     }
 
@@ -151,13 +155,13 @@ private:
         mProxy = rhs.mProxy;
         mServiceLocator = rhs.mServiceLocator;
         mLocatorParams = rhs.mLocatorParams;
-        mLg = rhs.mLg;
+        mLogger = rhs.mLogger;
     }
 
     P mProxy;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx mServiceLocator;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr mLocatorParams;
-    AsteriskSCF::System::Logging::Logger const *mLg;
+    AsteriskSCF::System::Logging::Logger const *mLogger;
 };
 
 }; // end SmartProxy

commit f2da511f5e9c516626fb788254ee3c83d4df1a58
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 2 12:48:39 2010 -0600

    verifyInitialize -> initializeOnce
    
    Since the function does more than just verify, it needs a more accurate
    name.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index dd0d8bb..d141d95 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -63,7 +63,7 @@ public:
     {
         assert(mServiceLocator && mLocatorParams);
 
-        if (!verifyInitialized())
+        if (!initializeOnce())
         {
             throw AsteriskSCF::Core::Discovery::V1::ServiceNotFound();
         }
@@ -129,9 +129,12 @@ private:
     }
 
     /**
-     * Utiltity to check for initialization state.
+     * Initializes this SmartProxy, but only if it hasn't already been
+     * initialized.
+     *
+     * @return True if initialization successful; false if unsuccessful.
      */
-    bool verifyInitialized()
+    bool initializeOnce()
     {
         if (isInitialized())
         {

commit f5e31dfba81ff92cec22ba81e36ff333afd38fa4
Author: David M. Lee <dlee at digium.com>
Date:   Mon Nov 29 08:54:27 2010 -0600

    Got rid of extra bool to track state.

diff --git a/SmartProxy/src/SmartProxy.h b/SmartProxy/src/SmartProxy.h
index 8e5da1f..dd0d8bb 100644
--- a/SmartProxy/src/SmartProxy.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -44,7 +44,7 @@ template <class P>
 class SmartProxy
 {
 public:
-    SmartProxy() : mServiceLocator(0), mLocatorParams(0), mInitialized(false), mLg(0) {}
+    SmartProxy() : mServiceLocator(0), mLocatorParams(0), mLg(0) {}
 
     SmartProxy(const SmartProxy &rhs)
     {
@@ -54,7 +54,7 @@ public:
     SmartProxy(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator,
         AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params,
         AsteriskSCF::System::Logging::Logger const &lg)
-        :  mServiceLocator(locator), mLocatorParams(params), mInitialized(false), mLg(&lg)
+        :  mServiceLocator(locator), mLocatorParams(params), mLg(&lg)
     {
         initialize();
     }
@@ -89,7 +89,7 @@ public:
 
     bool isInitialized()
     {
-        return mInitialized;
+        return mProxy != 0;
     }
 
 private:
@@ -126,10 +126,6 @@ private:
         {
             (*mLg)(Error) << "Unable to locate " << mLocatorParams->category;
         }
-        else
-        {
-            mInitialized = true;
-        }
     }
 
     /**
@@ -137,14 +133,14 @@ private:
      */
     bool verifyInitialized()
     {
-        if (mInitialized)
+        if (isInitialized())
         {
             return true;
         }
 
         // Try again to initialize.
         initialize();
-        return mInitialized;
+        return isInitialized();
     }
 
     void copy(const SmartProxy &rhs)
@@ -153,14 +149,12 @@ private:
         mServiceLocator = rhs.mServiceLocator;
         mLocatorParams = rhs.mLocatorParams;
         mLg = rhs.mLg;
-        mInitialized = rhs.mInitialized;
     }
 
     P mProxy;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx mServiceLocator;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr mLocatorParams;
     AsteriskSCF::System::Logging::Logger const *mLg;
-    bool mInitialized;
 };
 
 }; // end SmartProxy

commit 909b2ff2d9b7796c1533718af692fe3cd2d69e01
Author: David M. Lee <dlee at digium.com>
Date:   Mon Nov 22 20:55:14 2010 -0600

    First round of SmartProxy cleanups.
    
    * ProxyWrapper -> SmartProxy
    * Log to Logger instead of cout
    * Throw real exception instead of string

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 79e7361..8212b2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,5 +3,5 @@ if (integrated_build STREQUAL "true")
 	set(utils_bindir ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
 endif()
 
-add_subdirectory(ProxyWrapper)
+add_subdirectory(SmartProxy)
 add_subdirectory(StateReplicator)
diff --git a/ProxyWrapper/src/CMakeLists.txt b/ProxyWrapper/src/CMakeLists.txt
deleted file mode 100644
index da2461d..0000000
--- a/ProxyWrapper/src/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-# Define the SIP Channel Service component
-
-asterisk_scf_component_init(ProxyWrapper CXX)
-
-asterisk_scf_component_add_slice(ProxyWrapper ServiceLocatorIf)
-asterisk_scf_component_add_file(ProxyWrapper ProxyWrapper.h)
-asterisk_scf_component_add_file(ProxyWrapper ProxyWrapper.cpp)
-asterisk_scf_component_add_boost_libraries(ProxyWrapper core)
-
-asterisk_scf_component_build_library(ProxyWrapper)
-
-# MACH-O requires libraries for linking libraries
-if(APPLE)
-  target_link_libraries(ProxyWrapper ${ICE_CXX_LIB_IceUtil})
-  target_link_libraries(ProxyWrapper ${ICE_CXX_LIB_ZeroCIce})
-endif()
-
-asterisk_scf_component_install(ProxyWrapper LIBRARY lib "Proxy Wrapper" ProxyWrapper ARCHIVE DESTINATION lib)
-
diff --git a/ProxyWrapper/CMakeLists.txt b/SmartProxy/CMakeLists.txt
similarity index 100%
rename from ProxyWrapper/CMakeLists.txt
rename to SmartProxy/CMakeLists.txt
diff --git a/SmartProxy/src/CMakeLists.txt b/SmartProxy/src/CMakeLists.txt
new file mode 100644
index 0000000..cb7ea20
--- /dev/null
+++ b/SmartProxy/src/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Define the SIP Channel Service component
+
+asterisk_scf_component_init(SmartProxy CXX)
+
+asterisk_scf_component_add_slice(SmartProxy ServiceLocatorIf)
+asterisk_scf_component_add_file(SmartProxy SmartProxy.h)
+asterisk_scf_component_add_file(SmartProxy SmartProxy.cpp)
+asterisk_scf_component_add_boost_libraries(SmartProxy core)
+
+if(NOT logger_dir)
+   message(FATAL_ERROR "The logger directory could not be found ${logger_dir}")
+endif()
+include_directories(${logger_dir}/common)
+include_directories(${logger_dir}/client/src)
+
+asterisk_scf_component_build_library(SmartProxy)
+
+# MACH-O requires libraries for linking libraries
+if(APPLE)
+  target_link_libraries(SmartProxy ${ICE_CXX_LIB_IceUtil})
+  target_link_libraries(SmartProxy ${ICE_CXX_LIB_ZeroCIce})
+endif()
+
+asterisk_scf_component_install(SmartProxy LIBRARY lib "Smart Proxy" SmartProxy ARCHIVE DESTINATION lib)
+
diff --git a/ProxyWrapper/src/ProxyWrapper.cpp b/SmartProxy/src/SmartProxy.cpp
similarity index 96%
rename from ProxyWrapper/src/ProxyWrapper.cpp
rename to SmartProxy/src/SmartProxy.cpp
index 875d360..d4e7c45 100644
--- a/ProxyWrapper/src/ProxyWrapper.cpp
+++ b/SmartProxy/src/SmartProxy.cpp
@@ -14,7 +14,7 @@
  * at the top of the source tree.
  */
 
-#include "ProxyWrapper.h"
+#include "SmartProxy.h"
 
 namespace AsteriskSCF
 {
diff --git a/ProxyWrapper/src/ProxyWrapper.h b/SmartProxy/src/SmartProxy.h
similarity index 58%
rename from ProxyWrapper/src/ProxyWrapper.h
rename to SmartProxy/src/SmartProxy.h
index 3439f3f..8e5da1f 100644
--- a/ProxyWrapper/src/ProxyWrapper.h
+++ b/SmartProxy/src/SmartProxy.h
@@ -15,21 +15,23 @@
  */
 #pragma once
 
+#include <iostream>
+
 #include <Ice/Ice.h>
-#include <boost/shared_ptr.hpp>
 
 #include "Core/Discovery/ServiceLocatorIf.h"
+#include "logger.h"
 
 namespace AsteriskSCF
 {
-namespace ProxyWrapper
+namespace SmartProxy
 {
 
 /**
  * A wrapper for an Ice Proxy.
  * The Template parameter P is the proxy we're wrapping
  *
- * The main feature of using a proxy wrapper at this stage is that
+ * The main feature of using a smart proxy at this stage is that
  * it provides the ability to detect if we could find a given proxy
  * at initialization. If we did not, then the first time we try to
  * invoke a proxy operation, then we will attempt to acquire a proxy
@@ -39,43 +41,44 @@ namespace ProxyWrapper
  * more general purpose.
  */
 template <class P>
-class ProxyWrapper
+class SmartProxy
 {
 public:
-    ProxyWrapper() : mServiceLocator(0), mLocatorParams(0), mInitialized(false) {}
+    SmartProxy() : mServiceLocator(0), mLocatorParams(0), mInitialized(false), mLg(0) {}
 
-    ProxyWrapper(const ProxyWrapper &pw)
+    SmartProxy(const SmartProxy &rhs)
     {
-        copy(pw);
+        copy(rhs);
     }
 
-    ProxyWrapper(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator,
-        AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params)
-        :  mServiceLocator(locator), mLocatorParams(params), mInitialized(false)
+    SmartProxy(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator,
+        AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params,
+        AsteriskSCF::System::Logging::Logger const &lg)
+        :  mServiceLocator(locator), mLocatorParams(params), mInitialized(false), mLg(&lg)
     {
         initialize();
     }
 
-    P& operator->()
+    P& operator->() throw (AsteriskSCF::Core::Discovery::V1::ServiceNotFound)
     {
         assert(mServiceLocator && mLocatorParams);
 
         if (!verifyInitialized())
         {
-            throw "No access to Proxy";
+            throw AsteriskSCF::Core::Discovery::V1::ServiceNotFound();
         }
 
         return mProxy;
     }
 
-    ProxyWrapper operator=(const ProxyWrapper &pw)
+    SmartProxy &operator=(const SmartProxy &rhs)
     {
         // Boo to self-assignment
-        if (this == &pw)
+        if (this == &rhs)
         {
             return *this;
         }
-        copy(pw);
+        copy(rhs);
         return *this;
     }
 
@@ -95,24 +98,38 @@ private:
      */
     void initialize()
     {
+        using namespace AsteriskSCF::System::Logging;
+        if (!mServiceLocator)
+        {
+            // uninitialized; probably no logger setup yet, either
+            std::clog << "Missing ServiceLocator proxy.  Cannot initialize.\n";
+            return;
+        }
+
         try
         {
             // Use the locator to find the Proxy
-            Ice::ObjectPrx bridgeManagerObject = mServiceLocator->locate(mLocatorParams);
-            mProxy = P::checkedCast(bridgeManagerObject);
+            Ice::ObjectPrx obj = mServiceLocator->locate(mLocatorParams);
+            mProxy = P::checkedCast(obj);
+            if (obj && !mProxy)
+            {
+                (*mLg)(Error) << "Object (" << obj->ice_toString() << ") isn't of expected type";
+            }
         }
         catch (const Ice::Exception &e)
         {
-            std::cout << "Exception locating " << mLocatorParams->category << ": " << e.what() << std::endl;
+            (*mLg)(Error) << "Exception locating " << mLocatorParams->category << ": " << e.what();
             return;
         }
 
         if (mProxy == 0)
         {
-            std::cout << "Unable to locate " << mLocatorParams->category << std::endl;
+            (*mLg)(Error) << "Unable to locate " << mLocatorParams->category;
+        }
+        else
+        {
+            mInitialized = true;
         }
-
-        mInitialized = true;
     }
 
     /**
@@ -130,20 +147,22 @@ private:
         return mInitialized;
     }
 
-    void copy(const ProxyWrapper &pw)
+    void copy(const SmartProxy &rhs)
     {
-        mServiceLocator = pw.mServiceLocator;
-        mLocatorParams = pw.mLocatorParams;
-        mProxy = pw.mProxy;
-        mInitialized = pw.mInitialized;
+        mProxy = rhs.mProxy;
+        mServiceLocator = rhs.mServiceLocator;
+        mLocatorParams = rhs.mLocatorParams;
+        mLg = rhs.mLg;
+        mInitialized = rhs.mInitialized;
     }
 
     P mProxy;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx mServiceLocator;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr mLocatorParams;
+    AsteriskSCF::System::Logging::Logger const *mLg;
     bool mInitialized;
 };
 
-}; // end ProxyWrapper
+}; // end SmartProxy
 
 }; // end AsteriskSCF

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


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



More information about the asterisk-scf-commits mailing list