[asterisk-scf-commits] asterisk-scf/integration/test_channel.git branch "transfer" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Oct 12 08:48:13 CDT 2010


branch "transfer" has been created
        at  edee2184a6fcf5064f2bfd6abc0d339ecb8993b5 (commit)

- Log -----------------------------------------------------------------
commit edee2184a6fcf5064f2bfd6abc0d339ecb8993b5
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Oct 12 11:17:30 2010 -0230

    Updating the test session manager to comply with latest slice changes

diff --git a/slice b/slice
index 03ea08a..7e63131 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit 03ea08a0f749b5f36ae4dc36d25493689f9e273c
+Subproject commit 7e63131ea251461c0f4a4d751841601b107452bd
diff --git a/src/Service.cpp b/src/Service.cpp
index 6463ffd..c5217a2 100644
--- a/src/Service.cpp
+++ b/src/Service.cpp
@@ -55,7 +55,21 @@ void TestChannelDriver::start(const std::string& name, const Ice::CommunicatorPt
 void TestChannelDriver::stop()
 {
     mServiceManagement->unregister();
-    mAdapter->deactivate();
+    try
+    {
+        mAdapter->deactivate();
+        mAdapter->waitForDeactivate();
+    }
+    catch(...)
+    {
+    }
+    try
+    {
+        mAdapter->destroy();
+    }
+    catch(...)
+    {
+    }
 }
 
 extern "C" {
diff --git a/src/TestEndpoint.cpp b/src/TestEndpoint.cpp
index d90d487..df0917c 100644
--- a/src/TestEndpoint.cpp
+++ b/src/TestEndpoint.cpp
@@ -207,6 +207,32 @@ public:
         mEndpointManager->log(mId, __FUNCTION__);
     }
 
+    AsteriskSCF::SessionCommunications::V1::BridgePrx getBridge(const Ice::Current&)
+    {
+        mEndpointManager->log(mId, __FUNCTION__);
+        return mCurrentBridge;
+    }
+
+    AsteriskSCF::SessionCommunications::V1::SessionInfoPtr setBridge(const AsteriskSCF::SessionCommunications::V1::BridgePrx& newBridge,
+      const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)
+    {
+        boost::unique_lock<boost::shared_mutex> lock(mMutex);
+        mCurrentBridge = newBridge;
+        mEndpointManager->log(mId, __FUNCTION__);
+        return mInfo;
+    }
+
+    void removeBridge(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&) 
+    {
+        boost::unique_lock<boost::shared_mutex> lock(mMutex);
+        if(mCurrentBridge)
+        {
+            throw AsteriskSCF::SessionCommunications::V1::NotBridged();
+        }
+        mCurrentBridge = 0;
+        mEndpointManager->log(mId, __FUNCTION__);
+    }
+
     void echo()
     {
         mMediaServant->echo();
@@ -250,6 +276,7 @@ private:
     MediaSessionIPtr mMediaServant;
     AsteriskSCF::Media::V1::SessionPrx mMediaSession;
     SessionListenerMgrPtr mListeners;
+    AsteriskSCF::SessionCommunications::V1::BridgePrx mCurrentBridge;
 };
 
 typedef IceUtil::Handle<SessionI> SessionIPtr;

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


-- 
asterisk-scf/integration/test_channel.git



More information about the asterisk-scf-commits mailing list