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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Oct 13 12:50:41 CDT 2010


branch "transfer" has been updated
       via  b66a5f5d150d8e632d383b06b9de9b4e772d159c (commit)
      from  f671edf2e45dacba44cd029ad91eef19b79e50e6 (commit)

Summary of changes:
 src/BridgeImpl.cpp |   28 +++-------------------------
 1 files changed, 3 insertions(+), 25 deletions(-)


- Log -----------------------------------------------------------------
commit b66a5f5d150d8e632d383b06b9de9b4e772d159c
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Oct 13 15:19:36 2010 -0230

    Fixed issue where bridge was making assumption about the connected state of
    endpoints added via replaceSession.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 855f1ef..d1da9ba 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -618,34 +618,12 @@ void AsteriskSCF::BridgeService::BridgeImpl::replaceSession(const AsteriskSCF::S
 
     {
         //
-        // Now we lock again to connect media where necessary.
+        // Now that is all over with, let's add them to the bridge's list.
         //
         boost::unique_lock<boost::shared_mutex> lock(mLock);
-        std::vector<AsteriskSCF::SessionCommunications::V1::SessionInfoPtr>::iterator currentInfo = infoSeq.begin();
-        for(std::vector<BridgeSessionPtr>::iterator i = newMembers.begin(); i != newMembers.end() ; ++i, ++currentInfo)
+        for(std::vector<BridgeSessionPtr>::iterator j = newMembers.begin(); j != newMembers.end() ; ++j)
         {
-            mSessions.push_back(*i);
-            assert(currentInfo != infoSeq.end());
-            try
-            {
-                if((*currentInfo)->currentState != "ready")
-                {
-                    (*i)->setConnected();
-                    (*i)->setConnector(mSplicer.connect((*i)->getSession()));
-                }
-            }
-            catch(const Ice::Exception& ex)
-            {
-                //
-                // This should be logged and addressed, but otherwise ignored.
-                // As far as the session is concerned, it is now part of the
-                // bridge so this operation should continue. The proper remedy
-                // would be along the lines of retrying the media session
-                // establishment or getting a fair guarantee that it would
-                // succeed beforehand.
-                //
-                lg(Info) << __FUNCTION__ << ": connecting media for " << (*i)->getSession() << " threw " << ex.what(); 
-            }
+            mSessions.push_back(*j);
         }
     }
 

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list