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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Dec 17 16:22:32 UTC 2010


branch "master" has been updated
       via  4a97865504713362dbb8ffbfc312c902f6772fcf (commit)
      from  98cdbcf16080b782965b54c9c45df06ac51249c2 (commit)

Summary of changes:
 src/SessionRouter.cpp      |    5 +++++
 test/MockBridgeManager.cpp |    8 ++++++++
 test/MockBridgeManager.h   |    3 +++
 3 files changed, 16 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 4a97865504713362dbb8ffbfc312c902f6772fcf
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Dec 17 12:49:13 2010 -0330

    * Add some placeholder methods to support changes to the BridgeManager interface.
    
    * Add a check for null proxies from SessionEndpoint::createSession() calls.  This
      modification alone may not be sufficient to deal with the situation that uncovered this
      issue. The routing service needs to verify in all cases that the number of
      successfully created sessions is sufficient to continue.

diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 26b54ad..b50b711 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -506,6 +506,11 @@ public:
                 // Create a session on the destination.
                 lg(Debug) << "createSessionForEndpoints(): Creating a session at destination " << destination;
                 SessionPrx destSession = sessionEndpoint->createSession(destination, listener->getProxy());
+                if(!destSession)
+                {
+                    lg(Debug) << " Session endpoint returned a null proxy, continuing with other endpoints";
+                    continue;
+                }
                 lg(Debug) << "  Session proxy: " << destSession->ice_toString() ;
 
                 listener->addSession(destSession);
diff --git a/test/MockBridgeManager.cpp b/test/MockBridgeManager.cpp
index ae957c0..2210c31 100644
--- a/test/MockBridgeManager.cpp
+++ b/test/MockBridgeManager.cpp
@@ -46,6 +46,14 @@ void MockBridgeManager::removeListener(const BridgeManagerListenerPrx&, const Ic
 {
 }
 
+void MockBridgeManager::addDefaultBridgeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current&)
+{
+}
+
+void MockBridgeManager::removeDefaultBridgeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current&)
+{
+}
+
 BridgeSeq MockBridgeManager::listBridges(const Ice::Current&)
 {
     return mBridges;
diff --git a/test/MockBridgeManager.h b/test/MockBridgeManager.h
index 2c98c36..7c25c73 100644
--- a/test/MockBridgeManager.h
+++ b/test/MockBridgeManager.h
@@ -33,6 +33,9 @@ public:
     void addListener(const AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx&, const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::BridgePrx createBridge(const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions, const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx& listener, const Ice::Current&);
     void removeListener(const AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx&, const Ice::Current&);
+    void addDefaultBridgeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current&);
+    void removeDefaultBridgeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current&);
+
     AsteriskSCF::SessionCommunications::V1::BridgeSeq listBridges(const Ice::Current&);
     void shutdown(const ::Ice::Current&);
 

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list