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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Oct 19 09:07:31 CDT 2010


branch "master" has been updated
       via  f6554bb1e61e36e59330b360f6ebe474a8dd6504 (commit)
      from  caac9520790942c4278bf03d9038695c7587d93a (commit)

Summary of changes:
 src/BridgeImpl.cpp |   14 +++++++-------
 src/BridgeImpl.h   |    3 ++-
 2 files changed, 9 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit f6554bb1e61e36e59330b360f6ebe474a8dd6504
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Oct 19 11:36:13 2010 -0230

    Cause all side-effect shutdowns to occur in a background thread.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 1eea734..79cfc97 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -350,7 +350,7 @@ namespace BridgeService
             size_t endpointCount = mBridge->sessionStopped(source, response);
             if(endpointCount < 2)
             {
-                mBridge->shutdown(current);
+                mBridge->spawnShutdown();
             }
         }
 
@@ -775,12 +775,6 @@ void AsteriskSCF::BridgeService::BridgeImpl::statePreCheck()
     }
 }
 
-std::vector<AsteriskSCF::BridgeService::BridgeImpl::BridgeSessionPtr> AsteriskSCF::BridgeService::BridgeImpl::currentSessions()
-{
-    boost::shared_lock<boost::shared_mutex> lock(mLock);
-    return mSessions;
-}
-
 namespace
 {
 class ShutdownThread : public IceUtil::Thread
@@ -815,3 +809,9 @@ void AsteriskSCF::BridgeService::BridgeImpl::spawnShutdown()
         mShutdownThread->start();
     }
 }
+
+std::vector<AsteriskSCF::BridgeService::BridgeImpl::BridgeSessionPtr> AsteriskSCF::BridgeService::BridgeImpl::currentSessions()
+{
+    boost::shared_lock<boost::shared_mutex> lock(mLock);
+    return mSessions;
+}
diff --git a/src/BridgeImpl.h b/src/BridgeImpl.h
index 77a98cf..2fe8464 100644
--- a/src/BridgeImpl.h
+++ b/src/BridgeImpl.h
@@ -129,6 +129,8 @@ namespace BridgeService
         
         std::vector<BridgeSessionPtr> currentSessions();
 
+        void spawnShutdown();
+
     private:
 
         boost::shared_mutex mLock;
@@ -155,7 +157,6 @@ namespace BridgeService
         IceUtil::Handle<IceUtil::Thread> mShutdownThread;
 
         void statePreCheck();
-        void spawnShutdown();
     };
 
     typedef IceUtil::Handle<BridgeImpl> BridgeImplPtr;

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list