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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Sep 15 09:23:32 CDT 2010


branch "master" has been updated
       via  bd48b7395d8432e848b12591cde7eba69b25cb49 (commit)
      from  ac0aa68aecaed3a64108217ac1bc1e209b98678f (commit)

Summary of changes:
 src/BridgeImpl.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit bd48b7395d8432e848b12591cde7eba69b25cb49
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Sep 15 11:47:24 2010 -0230

    Resolve issue with shutdown where the bridge's session listener was not
    being removed at the proper time.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index ea843d7..a279897 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -34,13 +34,15 @@ namespace BridgeService
     class ShutdownImpl : public std::unary_function<BridgeImpl::BridgeSession, void>
     {
     public:
-        ShutdownImpl(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response) :
+        ShutdownImpl(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response) :
+            mListener(listener),
             mResponse(response)
         {
         }
 
         void operator()(const BridgeImpl::BridgeSession& b) 
         {
+            b.session->removeListener(mListener);
             b.session->stop(mResponse);
             if(b.connector)
             {
@@ -48,6 +50,7 @@ namespace BridgeService
             }
         }
     private:
+        AsteriskSCF::SessionCommunications::V1::SessionListenerPrx mListener;
         AsteriskSCF::SessionCommunications::V1::ResponseCodePtr mResponse;
     };
     
@@ -402,7 +405,7 @@ void AsteriskSCF::BridgeService::BridgeImpl::shutdown(const Ice::Current& curren
     if(mSessions.size() > 0)
     {
         std::for_each(mSessions.begin(), mSessions.end(),
-                AsteriskSCF::BridgeService::ShutdownImpl(new AsteriskSCF::SessionCommunications::V1::ResponseCode));
+                AsteriskSCF::BridgeService::ShutdownImpl(mSessionListenerPrx, new AsteriskSCF::SessionCommunications::V1::ResponseCode));
     }
 
     mLogger.getInfoStream() << current.adapter->getCommunicator()->identityToString(current.id) << ": is shutdown." << std::endl;

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list