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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jun 1 08:59:28 CDT 2011


branch "master" has been updated
       via  0584204733e9b75b4e93fbc505d525f3855c2ba9 (commit)
      from  87dbea8306aae28375fd8e0676f79825ba260dce (commit)

Summary of changes:
 src/SessionWrapper.cpp |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 0584204733e9b75b4e93fbc505d525f3855c2ba9
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Jun 1 11:26:28 2011 -0230

    Allow replacing of the media connector through the "fundamental media
    connection" function without checks to prior state.  For the most part this
    should be fine. Where it would get sticky is if there was an upstream
    action that was being repeated in error. Even that might not be noticable from
    the caller's point of view but would result in a lot of unnecessary work and
    RPCs.

diff --git a/src/SessionWrapper.cpp b/src/SessionWrapper.cpp
index 23ee5b9..2450ccd 100644
--- a/src/SessionWrapper.cpp
+++ b/src/SessionWrapper.cpp
@@ -456,10 +456,13 @@ void SessionWrapper::setupMedia()
 {
     mLogger(Debug) << FUNLOG << " for " << mId;
     boost::unique_lock<boost::shared_mutex> lock(mLock);
-    if (!mConnector)
-    {
-        mSplicer->connect(this, mSession->session);
-    }
+    //
+    // TODO: we don't really want there to be any precondition checks in this
+    // basic method.  If we need to prevent this from recurring, then it needs
+    // to be in the caller's logic, not here.
+    //
+    mConnector = 0;
+    mSplicer->connect(this, mSession->session);
 }
 
 void SessionWrapper::setConnector(const MediaConnectorPtr& connector)

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


-- 
asterisk-scf/release/bridging.git



More information about the asterisk-scf-commits mailing list