[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "async-bridging" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Apr 7 08:24:52 CDT 2011


branch "async-bridging" has been updated
       via  3151febe0ba22f274aabc26b04c498c2a9710019 (commit)
      from  361ce43d6710e456042c5c48f51bd5d594595141 (commit)

Summary of changes:
 src/BridgeImpl.cpp |    7 +------
 src/BridgeImpl.h   |   26 ++++++++++++++------------
 src/ServiceUtil.h  |    8 ++++----
 3 files changed, 19 insertions(+), 22 deletions(-)


- Log -----------------------------------------------------------------
commit 3151febe0ba22f274aabc26b04c498c2a9710019
Author: Brent Eagles <beagles at digium.com>
Date:   Thu Apr 7 10:53:57 2011 -0230

    Review feedback:
    * Fix out of order member initialization bug.
    * Reduced code duplication in BridgeImpl.
    * Fixup some comments.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index f386ffd..d501816 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -231,12 +231,7 @@ public:
 
     void addException(const SessionPrx& session, const Ice::Exception& ex)
     {
-        boost::unique_lock<boost::shared_mutex> lock(mLock);
-        SessionError error;
-        error.failedSession = session;
-        error.message = ex.what();
-        mExceptions.push_back(error);
-        ++mResponses;
+        addExceptionMessage(session, ex.what());
     }
 
     void addExceptionMessage(const SessionPrx& session, const string& msg)
diff --git a/src/BridgeImpl.h b/src/BridgeImpl.h
index 940aeb2..118686a 100644
--- a/src/BridgeImpl.h
+++ b/src/BridgeImpl.h
@@ -42,10 +42,6 @@ class Logger;
 namespace BridgeService
 {
 
-//
-// Forward declarations.
-//
-
 /** 
  *
  * Base class to mixin some methods that define the contract
@@ -72,7 +68,7 @@ public:
      * to listeners and bridged sessions to notify them that the bridge is
      * going away will not be made! Use shutdownImpl() for that kind of thing.
      *
-      **/
+     **/
     virtual void destroyImpl() = 0;
 
     /**
@@ -111,19 +107,25 @@ public:
 
     virtual SessionCollectionPtr sessions() = 0;
 
-    //
-    // Allows an external agent to force a state update replication.
-    //
+    /**
+     *
+     *  Allows an external agent to force a state update replication.
+     *
+     **/
     virtual void forceUpdate() = 0;
 
-    virtual void getAddSessionsTasks(QueuedTasks& tasks,
-            const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions) = 0;
-
     /**
      *
-     * Internal implementation detail interface.
+     * For the BridgeManager or any object managing a bridge object! Gets a list of initialized tasks that will add the
+     * provided sessions to the bridge object in a manner consistent with "Bridge::addSessions()".
      *
      **/
+    virtual void getAddSessionsTasks(QueuedTasks& tasks,
+            const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions) = 0;
+
+    //
+    // Internal implementation detail interface.
+    //
 
     /**
      *
diff --git a/src/ServiceUtil.h b/src/ServiceUtil.h
index 6ccab39..17f6b1e 100644
--- a/src/ServiceUtil.h
+++ b/src/ServiceUtil.h
@@ -95,15 +95,15 @@ class RegisterThread : public IceUtil::Thread
 public:
     RegisterThread(const IceUtil::Handle<LocatorRegistrationWrapper<T> >& registration, const IceUtil::Time& retryInterval) :
         mRegistration(registration),
-        mStopped(false),
-        mRetryInterval(retryInterval)
+        mRetryInterval(retryInterval),
+        mStopped(false)
     {
     }
 
     RegisterThread(const IceUtil::Handle<LocatorRegistrationWrapper<T> >& registration) :
         mRegistration(registration),
-        mStopped(false),
-        mRetryInterval(IceUtil::Time::seconds(15))
+        mRetryInterval(IceUtil::Time::seconds(15)),
+        mStopped(false)
     {
     }
 

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list