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

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


branch "indicate" has been updated
       via  1b9b61ef864f1dad53e329d4d9821497fe791cef (commit)
      from  a37477a9629413987a43b8ea0d5da47d56868625 (commit)

Summary of changes:
 src/BridgeImpl.cpp |   60 +++++++--------------------------------------------
 1 files changed, 9 insertions(+), 51 deletions(-)


- Log -----------------------------------------------------------------
commit 1b9b61ef864f1dad53e329d4d9821497fe791cef
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 7 11:36:12 2011 -0300

    Remove old code.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 588fad9..3a9313c 100755
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -376,6 +376,7 @@ public:
     {
 	AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr connected;
 	AsteriskSCF::SessionCommunications::V1::RingingIndicationPtr ringing;
+	AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped;
 
 	if ((connected = AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr::dynamicCast(indication)))
 	{
@@ -399,57 +400,14 @@ public:
 		std::for_each(sessions.begin(), sessions.end(), RingImpl(source));
 	    }
 	}
-    }
-
-    void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const Ice::Current&)
-    {
-        try
-        {
-            mBridge->sessionConnected(source);
-        }
-        catch(const Ice::Exception& ex)
-        {
-            lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
-            throw;
-        }
-        std::vector<BridgeImpl::BridgeSessionPtr> sessions(mBridge->currentSessions());
-        std::for_each(sessions.begin(), sessions.end(), ConnectImpl(source));
-    }
-
-    void flashed(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const Ice::Current&)
-    {
-    }
-
-    void held(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const Ice::Current&)
-    {
-    }
-
-    void progressing(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
-      const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response, const Ice::Current&)
-    {
-    }
-
-    void ringing(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const Ice::Current&)
-    {
-        std::vector<BridgeImpl::BridgeSessionPtr> sessions(mBridge->currentSessions());
-        if(sessions.size() > 0)
-        {
-            std::for_each(sessions.begin(), sessions.end(), RingImpl(source));
-        }
-    }
-
-    void stopped(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
-      const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response, const Ice::Current& current)
-    {
-        size_t endpointCount = mBridge->sessionStopped(source, response);
-        if(endpointCount < 2)
-        {
-            mBridge->spawnShutdown();
-        }
-    }
-
-    void unheld(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const Ice::Current&)
-    {
+	else if ((stopped = AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr::dynamicCast(indication)))
+	{
+	    size_t endpointCount = mBridge->sessionStopped(source, stopped->response);
+	    if(endpointCount < 2)
+	    {
+		mBridge->spawnShutdown();
+	    }
+	}
     }
 
 private:

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list