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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Feb 15 09:25:11 CST 2011


branch "async-bridging" has been updated
       via  c19349ed01e534be634efeef6bbf88c8d20637e4 (commit)
      from  46820583024c35051f30aaea460171cf9836c04c (commit)

Summary of changes:
 test/MockBridge.cpp |   25 +++++++++++++++++++------
 test/MockBridge.h   |    3 ++-
 2 files changed, 21 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit c19349ed01e534be634efeef6bbf88c8d20637e4
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Feb 15 11:54:35 2011 -0330

    Modifying signature of Bridge::replaceSession to match recent change
    to slice

diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index 12ea938..9e344ee 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -161,17 +161,30 @@ void MockBridge::shutdown(const Ice::Current&)
 {
 }
 
-void MockBridge::replaceSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
+void MockBridge::replaceSession_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_replaceSessionPtr& cb,
+    const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
     const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
     const Ice::Current&)
 {
-    SharedTestData::instance.mSessionReplaced = true;
+    try
+    {
+        SharedTestData::instance.mSessionReplaced = true;
 
-    removeSession(sessionToReplace);
-    addSessionsImpl(newSessions);
+        removeSession(sessionToReplace);
+        addSessionsImpl(newSessions);
 
-    ResponseCodePtr response = new ResponseCode(1);
-    sessionToReplace->stop(response);
+        ResponseCodePtr response = new ResponseCode(1);
+        sessionToReplace->stop(response);
+        cb->ice_response();
+    }
+    catch (const std::exception& ex)
+    {
+        cb->ice_exception(ex);
+    }
+    catch (...)
+    {
+        cb->ice_exception();
+    }
 }
 
 void MockBridge::connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session)
diff --git a/test/MockBridge.h b/test/MockBridge.h
index 10a04b6..92b4d46 100644
--- a/test/MockBridge.h
+++ b/test/MockBridge.h
@@ -46,7 +46,8 @@ public:
     void addListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current& );
     void removeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current& );
 
-    void replaceSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
+    void replaceSession_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_replaceSessionPtr&,
+        const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
         const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
         const Ice::Current&);
 

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list