[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "single-build-dir" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 26 09:05:37 CDT 2011


branch "single-build-dir" has been created
        at  80509d044f08a90c8fffa8f7524b8ad741d6f250 (commit)

- Log -----------------------------------------------------------------
commit 80509d044f08a90c8fffa8f7524b8ad741d6f250
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Apr 25 17:47:58 2011 -0500

    Changes to work with new single-build-directory CMake script.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01eadd2..8dedc49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,9 +16,6 @@ if(NOT integrated_build STREQUAL "true")
    # Include common AsteriskSCF build infrastructure. Make sure your submodules are pulled.
    include(cmake/AsteriskSCF.cmake)
 
-   # This project is C++ based and requires a minimum of 3.4 of Ice.
-   asterisk_scf_project(RoutingService 3.4 CXX)
-
    # Take care of slice definitions
    add_subdirectory(slice)
 
@@ -28,7 +25,7 @@ if(NOT integrated_build STREQUAL "true")
    set(integrated_build false)
 endif()
 
+asterisk_scf_project(RoutingService 3.4)
+
 add_subdirectory(src)
-add_subdirectory(config)
 add_subdirectory(test)
-
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
deleted file mode 100644
index 5aef64e..0000000
--- a/config/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Asterisk Scalable Communications Framework
-#
-# Copyright (C) 2010 -- Digium, Inc.
-#
-# All rights reserved.
-#
-
-configure_file(routingtest-integ.config.in routingtest-integ.config)
diff --git a/config/routingtest-integ.config.in b/config/routingtest-integ.config
similarity index 90%
rename from config/routingtest-integ.config.in
rename to config/routingtest-integ.config
index 001b4c7..74836c8 100644
--- a/config/routingtest-integ.config.in
+++ b/config/routingtest-integ.config
@@ -2,12 +2,12 @@
 
 IceBox.InheritProperties=1
 
-IceBox.Service.ServiceDiscovery=${service_locator_bindir}/src at service_locator:create
-IceBox.Service.BasicRoutingService=../src at BasicRoutingService:create
+IceBox.Service.ServiceDiscovery=service_locator:create
+IceBox.Service.BasicRoutingService=BasicRoutingService:create
 
 # Boost Test arguments can be passed here.
-# IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
-IceBox.Service.RoutingTest = ../test at RoutingTest:create
+# IceBox.Service.RoutingTest=RoutingTest:create --log_level=all
+IceBox.Service.RoutingTest=RoutingTest:create
 
 IceBox.LoadOrder=ServiceDiscovery,BasicRoutingService,RoutingTest
 
diff --git a/config/routingtest.config b/config/routingtest.config
index 7dd703d..c35f7ea 100644
--- a/config/routingtest.config
+++ b/config/routingtest.config
@@ -1,7 +1,7 @@
 # This is a configuration file for the Routing Service Test driver.
 
 
-IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
+IceBox.Service.RoutingTest=RoutingTest:create --log_level=all
 
 IceBox.InheritProperties=1 
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c2935e1..e51d804 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -21,5 +21,5 @@ asterisk_scf_component_build_icebox(RoutingTest)
 target_link_libraries(RoutingTest asterisk-scf-api)
 
 if(integrated_build STREQUAL "true")
-   icebox_add_test(RoutingTest ../config/routingtest-integ.config)
+   asterisk_scf_test_icebox(RoutingTest config/routingtest-integ.config)
 endif()

commit 5b9b4472bc3b67c0bcd31817a913dfcafa822551
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Fri Apr 22 15:51:48 2011 -0500

    Merge of changes from integration branch regression-test-setLocatorDestIds.

diff --git a/config/routingtest-integ.config.in b/config/routingtest-integ.config.in
index 353bb61..001b4c7 100644
--- a/config/routingtest-integ.config.in
+++ b/config/routingtest-integ.config.in
@@ -90,7 +90,7 @@ ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
 
 # Test endpoints for the service locator adapter
 ServiceLocatorAdapter.Endpoints=tcp -p 4411
-
+ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
 
 # Logger configuration
 LoggerAdapter.Endpoints=default
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index f82472d..bd60d11 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -287,34 +287,25 @@ public:
  */
 BOOST_AUTO_TEST_CASE(AddAndRemoveEndpointLocator)
 {
-    bool addLocatorSucceeded(true);
     try
     {
         SharedTestData::instance.locatorRegistry->addEndpointLocator("TestChannel", SharedTestData::instance.regExIds, SharedTestData::instance.endpointLocatorPrx);
     }
     catch (...)
     {
-        addLocatorSucceeded = false;
-        BOOST_TEST_MESSAGE("Exception adding EndpointLocator.");
+        BOOST_FAIL("Exception adding EndpointLocator.");
     }
 
-    BOOST_CHECK(addLocatorSucceeded);
-
-    bool removeLocatorSucceeded(true);
     try
     {
         SharedTestData::instance.locatorRegistry->removeEndpointLocator("TestChannel");
-
     }
     catch (...)
     {
-        removeLocatorSucceeded = false;
-        BOOST_TEST_MESSAGE("Exception removing EndpointLocator.");
+        BOOST_FAIL("Exception removing EndpointLocator.");
     }
-    BOOST_CHECK(removeLocatorSucceeded);
 
     BOOST_TEST_MESSAGE("Completed AddAndRemoveEndpointLocator test.");
-
 }
 
 /**
@@ -324,7 +315,6 @@ BOOST_AUTO_TEST_CASE(AddAndRemoveEndpointLocator)
  */
 BOOST_AUTO_TEST_CASE(AddEndpointLocatorTwice)
 {
-    bool addLocatorSucceeded(true);
     try
     {
         SharedTestData::instance.locatorRegistry->addEndpointLocator("TestChannel", SharedTestData::instance.regExIds, SharedTestData::instance.endpointLocatorPrx);
@@ -332,27 +322,19 @@ BOOST_AUTO_TEST_CASE(AddEndpointLocatorTwice)
     }
     catch (...)
     {
-        addLocatorSucceeded = false;
-        BOOST_TEST_MESSAGE("Exception adding EndpointLocator the second time.");
+        BOOST_FAIL("Exception adding EndpointLocator the second time.");
     }
 
-    BOOST_CHECK(addLocatorSucceeded);
-
-    bool removeLocatorSucceeded(true);
     try
     {
         SharedTestData::instance.locatorRegistry->removeEndpointLocator("TestChannel");
-
     }
     catch (...)
     {
-        removeLocatorSucceeded = false;
-        BOOST_TEST_MESSAGE("Exception removing EndpointLocator.");
+        BOOST_FAIL("Exception removing EndpointLocator.");
     }
-    BOOST_CHECK(removeLocatorSucceeded);
 
     BOOST_TEST_MESSAGE("Completed AddEndpointLocatorTwice test.");
-
 }
 
 /**
@@ -373,21 +355,16 @@ BOOST_FIXTURE_TEST_CASE(LookupOwnEndpoint, PerTestFixture)
     }
     catch(const IceUtil::Exception &ie)
     {
-        bool IceException(false);
         string msg = "Exception looking up our own endpoint:";
         msg += ie.what();
-        BOOST_TEST_MESSAGE(msg);
-        BOOST_CHECK(IceException);
+        BOOST_FAIL(msg);
     }
     catch (...)
     {
-        bool unknownException(false);
-        BOOST_TEST_MESSAGE("Exception looking up our own endpoint.");
-        BOOST_CHECK(unknownException);
+        BOOST_FAIL("Exception looking up our own endpoint.");
     }
 
     BOOST_TEST_MESSAGE("Completed LookupOwnEndpoint test.");
-
 }
 
 /**
@@ -434,17 +411,13 @@ BOOST_FIXTURE_TEST_CASE(RouteSession, PerTestFixture)
     }
     catch(const IceUtil::Exception &ie)
     {
-        bool IceException(false);
         string msg = "Exception in RouteSession:";
         msg += ie.what();
-        BOOST_TEST_MESSAGE(msg);
-        BOOST_CHECK(IceException);
+        BOOST_FAIL(msg);
     }
     catch (...)
     {
-        bool unknownException(false);
-        BOOST_TEST_MESSAGE("Exception in RouteSession:");
-        BOOST_CHECK(unknownException);
+        BOOST_FAIL("Exception in RouteSession:");
     }
 }
 
@@ -496,17 +469,13 @@ BOOST_FIXTURE_TEST_CASE(BlindTransfer, PerTestFixture)
     }
     catch(const IceUtil::Exception &ie)
     {
-        bool IceException(false);
         string msg = "Exception routing session:";
         msg += ie.what();
-        BOOST_TEST_MESSAGE(msg);
-        BOOST_CHECK(IceException);
+        BOOST_FAIL(msg);
     }
     catch (...)
     {
-        bool unknownException(false);
-        BOOST_TEST_MESSAGE("Exception routing session.");
-        BOOST_CHECK(unknownException);
+        BOOST_FAIL("Exception routing session.");
     }
 }
 
@@ -571,16 +540,71 @@ BOOST_FIXTURE_TEST_CASE(AttendedTransfer, PerTestFixture)
     }
     catch(const IceUtil::Exception &ie)
     {
-        bool IceException(false);
         string msg = "Exception in AttendedTransfer:";
         msg += ie.what();
-        BOOST_TEST_MESSAGE(msg);
-        BOOST_CHECK(IceException);
+        BOOST_FAIL(msg);
+    }
+    catch (...)
+    {
+        BOOST_FAIL("Exception in AttendedTransfer:");
+    }
+}
+
+/**
+ * Test changing the locator ids for a registered endpoint locator.
+ */
+BOOST_AUTO_TEST_CASE(ChangeLocatorIds)
+{
+    try
+    {
+        SharedTestData::instance.locatorRegistry->addEndpointLocator("TestChannel", 
+                                                                     SharedTestData::instance.regExIds, 
+                                                                     SharedTestData::instance.endpointLocatorPrx);
     }
     catch (...)
     {
-        bool unknownException(false);
-        BOOST_TEST_MESSAGE("Exception in AttendedTransfer:");
-        BOOST_CHECK(unknownException);
+        BOOST_FAIL("Exception adding EndpointLocator.");
     }
+
+    // Change the set of ids that our mock endpoint locator is supporting locally. 
+    SharedTestData::instance.endpointLocator->clear();
+
+    SharedTestData::instance.endpointLocator->addEndpoint("abc");
+    SharedTestData::instance.endpointLocator->addEndpoint("def");
+
+    // Initialize the regular expressions for the ids that our mock channel will support.
+    SharedTestData::instance.regExIds.push_back("abc");
+    SharedTestData::instance.regExIds.push_back("def");  
+
+    // Tell the routing service we have different destination ids
+    try
+    {
+        std::vector<std::string> newvals;
+        newvals.push_back("abc");
+        newvals.push_back("def");
+        SharedTestData::instance.locatorRegistry->setEndpointLocatorDestinationIds("TestChannel", newvals);
+    }
+    catch (...)
+    {
+        BOOST_FAIL("Exception modifying EndpointLocator.");
+    }
+
+    // Now make sure we can do a lookup with the new ids. 
+    try
+    {
+        BOOST_TEST_MESSAGE("Looking up endpoint via Routing Service...");
+        string lookupVal = "abc";
+        AsteriskSCF::Core::Endpoint::V1::EndpointSeq seq = SharedTestData::instance.locatorRegistry->lookup(lookupVal);
+
+        BOOST_TEST_MESSAGE(" ...lookup completed.");
+
+        BOOST_CHECK(seq.size() > 0);
+        BOOST_CHECK(seq[0]->getId() == lookupVal);
+    }
+    catch (...)
+    {
+        BOOST_FAIL("Exception during lookup of modified EndpointLocator.");
+    }
+
+    BOOST_TEST_MESSAGE("Completed ChangeLocatorIds test.");
 }

commit 728136565bfcda6555d8335ae68dbc1ed3e0859f
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Apr 22 16:55:17 2011 -0230

    Small change to address a change in a function in SmartProxy.

diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 1c14b07..f492f80 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -607,7 +607,7 @@ void SessionRouter::routeSession(
 {
     lg(Debug) << "routeSession() entered with destination " << destination ;
 
-    if (!mImpl->mBridgeManager.initializeOnce())
+    if (!mImpl->mBridgeManager.initialize())
     {
         lg(Error) << "No proxy to BridgeManager.  "
             "Make sure all services are running.";

commit 2bf23eebe4d576ba355cab8b818e280267999cba
Merge: b3ca172 6e3878b
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 21 12:13:47 2011 -0300

    Merge branch 'indicate'
    
    Conflicts:
    	src/SessionRouter.cpp

diff --cc src/SessionRouter.cpp
index 12addb9,dfeb38c..1c14b07
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@@ -122,56 -122,37 +122,37 @@@ public
  
  public: // The following operations are implementations of the SessionListener interface.
  
-     void connected(const SessionPrx&, const Ice::Current&)
-     {
-     }
- 
-     void flashed(const SessionPrx&, const Ice::Current&)
-     {
-     }
- 
-     void held(const SessionPrx&, const Ice::Current&)
-     {
-     }
- 
-     void progressing(const SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
-     {
-     }
- 
-     void ringing(const SessionPrx&, const Ice::Current&)
-     {
-     }
- 
-     void stopped(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& responseCode, const Ice::Current&)
-     {
-         mTerminated = true;
- 
-         SessionSeq cacheSessions;
-         {
-             boost::shared_lock<boost::shared_mutex> lock(mLock);
-             cacheSessions = mSessions;
-         }
- 
-         // Forward the stop message to all sessions other than the one that originally sent it.
-         for(SessionSeq::iterator s = cacheSessions.begin(); s != cacheSessions.end(); ++s)
-         {
-             try
-             {
-                 if (session->ice_getIdentity() != (*s)->ice_getIdentity())
-                 {
-                     (*s)->stop(responseCode);
-                 }
-             }
-             catch(const Ice::Exception &e)
-             {
-                 lg(Error) << "Session Listener unable to forward stop to session " << (*s)->ice_toString() << " due to " << e.what();
-             }
-         }
- 
-     }
- 
-     void unheld(const SessionPrx&, const Ice::Current&)
+     void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
+ 	const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
      {
+ 	AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped;
+ 
+ 	if ((stopped =  AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr::dynamicCast(indication)))
+ 	{
+ 	    mTerminated = true;
+ 
+ 	    SessionSeq cacheSessions;
+ 	    {
+ 		boost::shared_lock<boost::shared_mutex> lock(mLock);
+ 		cacheSessions = mSessions;
+ 	    }
+ 
+ 	    // Forward the stop message to all sessions other than the one that originally sent it.
+ 	    for(SessionSeq::iterator s = cacheSessions.begin(); s != cacheSessions.end(); ++s)
+ 	    {
 -            try
 -            {
 -                if (session->ice_getIdentity() != (*s)->ice_getIdentity())
 -                {
 -                    (*s)->stop(stopped->response);
 -                }
 -            }
 -            catch(const Ice::Exception &e)
 -            {
 -                lg(Error) << "Session Listener unable to forward stop to session " << (*s)->ice_toString() << " due to " << e.what();
 -            }
++		try
++		{
++		    if (session->ice_getIdentity() != (*s)->ice_getIdentity())
++		    {
++			(*s)->stop(stopped->response);
++		    }
++		}
++		catch(const Ice::Exception &e)
++		{
++		    lg(Error) << "Session Listener unable to forward stop to session " << (*s)->ice_toString() << " due to " << e.what();
++		}
+ 	    }
+ 	}
      }
  
  public: 

commit b3ca1721ff1e4ff3f5dab1f3e18daf95246bd9fa
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Apr 19 09:44:02 2011 -0230

    Merge async-bridging branch. Some bridging methods were changed
    to use AMD so the mock objects in the routing test suite needed
    to be updated.

diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index b85244d..38ff06b 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -77,7 +77,7 @@ MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx&)
     Ice::ObjectPrx bridgeObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(this);
     mBridgePrx = BridgePrx::checkedCast(bridgeObjectPrx);
 
-    addSessions(sessions);
+    addSessionsImpl(sessions);
 }
 
 MockBridge::~MockBridge()
@@ -88,22 +88,42 @@ MockBridge::~MockBridge()
     mListener = 0;
 }
 
-void MockBridge::addSessions(const SessionSeq& newSessions, const Ice::Current&)
+void MockBridge::addSessions_async(const AMD_Bridge_addSessionsPtr& callback, const SessionSeq& newSessions,
+        const Ice::Current&)
 {
-    mSessions.reserve( mSessions.size() + newSessions.size());
-    mSessions.insert( mSessions.end(), newSessions.begin(), newSessions.end());
-
-    for (SessionSeq::const_iterator s = newSessions.begin(); s != newSessions.end(); ++s)
+    try
     {
-        (*s)->setBridge(mBridgePrx, mListenerPrx);
+        addSessionsImpl(newSessions);
+        callback->ice_response();
+    }
+    catch (const std::exception& ex)
+    {
+        callback->ice_exception(ex);
+    }
+    catch (...)
+    {
+        callback->ice_exception();
     }
 }
 
-void MockBridge::removeSessions(const SessionSeq& sessions, const Ice::Current&)
+void MockBridge::removeSessions_async(const AMD_Bridge_removeSessionsPtr& callback, const SessionSeq& sessions,
+        const Ice::Current&)
 {
-    for(SessionSeq::const_iterator s = sessions.begin(); s != sessions.end(); ++s)
+    try
+    {
+        for(SessionSeq::const_iterator s = sessions.begin(); s != sessions.end(); ++s)
+        {
+            removeSession(*s);
+        }
+        callback->ice_response();
+    }
+    catch (const std::exception& ex)
+    {
+        callback->ice_exception(ex);
+    }
+    catch (...)
     {
-        removeSession(*s);
+        callback->ice_exception();
     }
 }
 
@@ -141,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);
-    addSessions(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&)
@@ -159,6 +192,17 @@ void MockBridge::connected(const AsteriskSCF::SessionCommunications::V1::Session
     SharedTestData::instance.mBridgeConnected = true;
 }
 
+void MockBridge::addSessionsImpl(const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions)
+{
+    mSessions.reserve( mSessions.size() + newSessions.size());
+    mSessions.insert( mSessions.end(), newSessions.begin(), newSessions.end());
+
+    for (SessionSeq::const_iterator s = newSessions.begin(); s != newSessions.end(); ++s)
+    {
+        (*s)->setBridge(mBridgePrx, mListenerPrx);
+    }
+}
+
 } // RoutingTest
 } // AsteriskSCF
 
diff --git a/test/MockBridge.h b/test/MockBridge.h
index 5a116bb..92b4d46 100644
--- a/test/MockBridge.h
+++ b/test/MockBridge.h
@@ -34,16 +34,20 @@ public:
     ~MockBridge();
 
     // Overrides
-    void addSessions(const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions, const Ice::Current& = ::Ice::Current());
+    void addSessions_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_addSessionsPtr&,
+            const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
+            const Ice::Current& = ::Ice::Current());
     void destroy(const Ice::Current& ) ;
-    void removeSessions(const AsteriskSCF::SessionCommunications::V1::SessionSeq&, const Ice::Current&);
+    void removeSessions_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_removeSessionsPtr&,
+            const AsteriskSCF::SessionCommunications::V1::SessionSeq&, const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::SessionSeq listSessions(const Ice::Current&);
 
     void shutdown(const Ice::Current&) ;
     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&);
 
@@ -57,6 +61,8 @@ private:
     BridgeSessionListenerPtr mListener;
     AsteriskSCF::SessionCommunications::V1::SessionListenerPrx mListenerPrx;
     AsteriskSCF::SessionCommunications::V1::BridgePrx mBridgePrx;
+
+    void addSessionsImpl(const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions);
 };
 
 } // RoutingTest
diff --git a/test/MockBridgeManager.cpp b/test/MockBridgeManager.cpp
index 2210c31..5b1d58d 100644
--- a/test/MockBridgeManager.cpp
+++ b/test/MockBridgeManager.cpp
@@ -30,16 +30,28 @@ void MockBridgeManager::addListener(const BridgeManagerListenerPrx&, const Ice::
 {
 }
 
-BridgePrx MockBridgeManager::createBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener, const Ice::Current&)
+void MockBridgeManager::createBridge_async(const AMD_BridgeManager_createBridgePtr& callback,
+        const SessionSeq& sessions, const BridgeListenerPrx& listener, const Ice::Current&)
 {
-    MockBridge *mockBridge = new MockBridge(sessions, listener);
-    BridgePtr bridge(mockBridge);
-    mBridgeServants.push_back(bridge);
+    try
+    {
+        MockBridge *mockBridge = new MockBridge(sessions, listener);
+        BridgePtr bridge(mockBridge);
+        mBridgeServants.push_back(bridge);
 
-    BridgePrx bridgePrx = mockBridge->getProxy();
-    mBridges.push_back(bridgePrx);
+        BridgePrx bridgePrx = mockBridge->getProxy();
+        mBridges.push_back(bridgePrx);
 
-    return bridgePrx;
+        callback->ice_response(bridgePrx);
+    }
+    catch (const std::exception& ex)
+    {
+        callback->ice_exception(ex);
+    }
+    catch (...)
+    {
+        callback->ice_exception();
+    }
 }
 
 void MockBridgeManager::removeListener(const BridgeManagerListenerPrx&, const Ice::Current& )
diff --git a/test/MockBridgeManager.h b/test/MockBridgeManager.h
index f741908..1a25413 100644
--- a/test/MockBridgeManager.h
+++ b/test/MockBridgeManager.h
@@ -31,7 +31,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 createBridge_async(const AsteriskSCF::SessionCommunications::V1::AMD_BridgeManager_createBridgePtr&,
+            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&);

commit 42c99da77483e81f27dd51caf997df6f3999b6f3
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Apr 14 13:25:27 2011 -0500

    Minor fixes for various code constructs that trip up GCC with new warning
    options enabled (-Wextra, -Wconversion, -Wformat, and others).

diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 75c5a8f..111f0a1 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -301,7 +301,7 @@ void BasicRoutingServiceApp::initialize()
 /**
  * Implementation of the required IceBox::Service start method.
  */
-void BasicRoutingServiceApp::start(const string& name, const Ice::CommunicatorPtr& communicator, const Ice::StringSeq& args)
+void BasicRoutingServiceApp::start(const string& name, const Ice::CommunicatorPtr& communicator, const Ice::StringSeq&)
 {
     lg(Info) << "Starting...";
 
@@ -375,7 +375,7 @@ void BasicRoutingServiceApp::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new AsteriskSCF::BasicRoutingService::BasicRoutingServiceApp;
 }
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 30abafe..12addb9 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -52,15 +52,15 @@ class RetryPolicy
 public:
     /**
      * Constructor:
-     *  @param maxRetries Maximum number of times to retry. 
+     *  @param retries Maximum number of times to retry. 
      *  @intervalInMilliseconds Will sleep this amount in the retry() method. 
      */
-    RetryPolicy(size_t maxRetries, size_t intervalInMilliseconds) :
-        mMaxRetries(maxRetries),
+    RetryPolicy(size_t retries, size_t intervalInMilliseconds) :
+        mMaxRetries(retries),
         mRetryIntervalMilliseconds(intervalInMilliseconds),
         mCounter(0)
     {
-        assert(maxRetries < 0xffff);
+        assert(mMaxRetries < 0xffff);
     }
 
     /**
@@ -122,23 +122,23 @@ public:
 
 public: // The following operations are implementations of the SessionListener interface.
 
-    void connected(const SessionPrx& session, const Ice::Current&)
+    void connected(const SessionPrx&, const Ice::Current&)
     {
     }
 
-    void flashed(const SessionPrx& session, const Ice::Current&)
+    void flashed(const SessionPrx&, const Ice::Current&)
     {
     }
 
-    void held(const SessionPrx& session, const Ice::Current&)
+    void held(const SessionPrx&, const Ice::Current&)
     {
     }
 
-    void progressing(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
+    void progressing(const SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
     {
     }
 
-    void ringing(const SessionPrx& session, const Ice::Current&)
+    void ringing(const SessionPrx&, const Ice::Current&)
     {
     }
 
@@ -170,7 +170,7 @@ public: // The following operations are implementations of the SessionListener i
 
     }
 
-    void unheld(const SessionPrx& session, const Ice::Current&)
+    void unheld(const SessionPrx&, const Ice::Current&)
     {
     }
 
@@ -211,7 +211,7 @@ public:
         }
     }
 
-    const int getNumSessions()
+    SessionSeq::size_type getNumSessions()
     {
         boost::shared_lock<boost::shared_mutex> lock(mLock);
         return mSessions.size();
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index b383f61..b85244d 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -28,7 +28,7 @@ namespace RoutingTest
 class BridgeSessionListener : public SessionListener
 {
 public:
-    BridgeSessionListener(MockBridge *bridge)
+    BridgeSessionListener(MockBridge *)
     {
     }
 
@@ -68,7 +68,7 @@ private:
 typedef IceUtil::Handle<BridgeSessionListener> BridgeSessionListenerPtr;
 
 
-MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener)
+MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx&)
 {
     mListener = new BridgeSessionListener(this);
     Ice::ObjectPrx listernerObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(mListener);
@@ -154,7 +154,7 @@ void MockBridge::replaceSession(const AsteriskSCF::SessionCommunications::V1::Se
     sessionToReplace->stop(response);
 }
 
-void MockBridge::connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session)
+void MockBridge::connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx&)
 {
     SharedTestData::instance.mBridgeConnected = true;
 }
diff --git a/test/MockSessionEndpoint.cpp b/test/MockSessionEndpoint.cpp
index a945c70..8bf3f85 100644
--- a/test/MockSessionEndpoint.cpp
+++ b/test/MockSessionEndpoint.cpp
@@ -28,7 +28,7 @@ namespace AsteriskSCF
 namespace RoutingTest
 {
 
-SessionPrx MockSessionEndpoint::createSession(const string& dest, const SessionListenerPrx& listener, const Ice::Current&)
+SessionPrx MockSessionEndpoint::createSession(const string& dest, const SessionListenerPrx&, const Ice::Current&)
 {
     string sessionId = dest + "_" + mId + "_" + boost::lexical_cast<string>(++mCounter);
 
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 0c5d4c7..f82472d 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -68,11 +68,11 @@ void RoutingServiceTest::start(std::string const &name,
     for (Ice::StringSeq::const_iterator i = args.begin(); i != args.end(); ++i)
     {
         argv.push_back(i->c_str());
+	mCachedArgs.argc++;
     }
     // null terminated list
     argv.push_back((char const *) 0);
 
-    mCachedArgs.argc = argv.size() - 1;
     mCachedArgs.argv = (char**)&argv[0];
     mCachedArgs.inheritedProps = communicator->getProperties();
 
@@ -86,7 +86,7 @@ void RoutingServiceTest::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new RoutingServiceTest;
 }

commit 17315ed02076c88dde9e74b93c661c255b28fffa
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Apr 13 12:16:01 2011 -0500

    Specified the icebox service library search path in the routing test config file.

diff --git a/config/routingtest-integ.config.in b/config/routingtest-integ.config.in
index 8365b39..353bb61 100644
--- a/config/routingtest-integ.config.in
+++ b/config/routingtest-integ.config.in
@@ -7,7 +7,7 @@ IceBox.Service.BasicRoutingService=../src at BasicRoutingService:create
 
 # Boost Test arguments can be passed here.
 # IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
-IceBox.Service.RoutingTest = RoutingTest:create
+IceBox.Service.RoutingTest = ../test at RoutingTest:create
 
 IceBox.LoadOrder=ServiceDiscovery,BasicRoutingService,RoutingTest
 

commit 62336bb7f690b64562ccd19ed6cd370f6e47ac28
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Apr 11 17:59:49 2011 -0300

    Fix a scoping issue.

diff --git a/src/EndpointRegistry.cpp b/src/EndpointRegistry.cpp
index 73a51d3..362d625 100644
--- a/src/EndpointRegistry.cpp
+++ b/src/EndpointRegistry.cpp
@@ -224,7 +224,7 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(const std::string& locat
 
         {   // critical scope
             boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
-            EndpointLocatorMapIterator existing = mImpl->mEndpointLocatorMap.find(locatorId);
+            existing = mImpl->mEndpointLocatorMap.find(locatorId);
             end = mImpl->mEndpointLocatorMap.end();
         }
 

commit 6e3878b6a12ac333e817284504896984dd7bc3ee
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 7 11:32:43 2011 -0300

    Remove old code.

diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 71146f5..dfeb38c 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -122,61 +122,37 @@ public:
 
 public: // The following operations are implementations of the SessionListener interface.
 
-    void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&)
+    void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
+	const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
     {
-	// We do not care about anything besides stopped, so this really is fine being blank
-    }
-
-    void connected(const SessionPrx& session, const Ice::Current&)
-    {
-    }
-
-    void flashed(const SessionPrx& session, const Ice::Current&)
-    {
-    }
-
-    void held(const SessionPrx& session, const Ice::Current&)
-    {
-    }
-
-    void progressing(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
-    {
-    }
+	AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped;
 
-    void ringing(const SessionPrx& session, const Ice::Current&)
-    {
-    }
-
-    void stopped(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& responseCode, const Ice::Current&)
-    {
-        mTerminated = true;
+	if ((stopped =  AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr::dynamicCast(indication)))
+	{
+	    mTerminated = true;
 
-        SessionSeq cacheSessions;
-        {
-            boost::shared_lock<boost::shared_mutex> lock(mLock);
-            cacheSessions = mSessions;
-        }
+	    SessionSeq cacheSessions;
+	    {
+		boost::shared_lock<boost::shared_mutex> lock(mLock);
+		cacheSessions = mSessions;
+	    }
 
-        // Forward the stop message to all sessions other than the one that originally sent it.
-        for(SessionSeq::iterator s = cacheSessions.begin(); s != cacheSessions.end(); ++s)
-        {
+	    // Forward the stop message to all sessions other than the one that originally sent it.
+	    for(SessionSeq::iterator s = cacheSessions.begin(); s != cacheSessions.end(); ++s)
+	    {
             try
             {
                 if (session->ice_getIdentity() != (*s)->ice_getIdentity())
                 {
-                    (*s)->stop(responseCode);
+                    (*s)->stop(stopped->response);
                 }
             }
             catch(const Ice::Exception &e)
             {
                 lg(Error) << "Session Listener unable to forward stop to session " << (*s)->ice_toString() << " due to " << e.what();
             }
-        }
-
-    }
-
-    void unheld(const SessionPrx& session, const Ice::Current&)
-    {
+	    }
+	}
     }
 
 public: 
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index 1f026a2..14f5a5d 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -44,35 +44,6 @@ public:
 	}
     }
 
-    virtual void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session, const Ice::Current&)
-    {
-        mBridge->connected(session);
-    }
-
-    virtual void flashed(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
-    {
-    }
-
-    virtual void held(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
-    {
-    }
-
-    virtual void progressing(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
-    {
-    }
-
-    virtual void ringing(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
-    {
-    }
-
-    virtual void stopped(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
-    {
-    }
-
-    virtual void unheld(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
-    {
-    }
-
 private:
     MockBridge *mBridge;
 };
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index ffe3b4e..be48767 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -95,18 +95,6 @@ void MockSession::indicate(const AsteriskSCF::SessionCommunications::V1::Indicat
     }
 }
 
-void MockSession::connect(const Ice::Current&)
-{
-    for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
-    {
-	(*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
-    }
-}
-
-void MockSession::flash(const Ice::Current&)
-{
-}
-
 SessionEndpointPrx MockSession::getEndpoint(const Ice::Current&)
 {
     return mEndpointPrx;
@@ -123,14 +111,6 @@ AsteriskSCF::Media::V1::SessionPrx MockSession::getMediaSession(const Ice::Curre
     return 0;
 }
 
-void MockSession::hold(const Ice::Current&)
-{
-}
-
-void MockSession::progress(const ResponseCodePtr&, const Ice::Current&)
-{
-}
-
 void MockSession::removeListener(const SessionListenerPrx& listener, const Ice::Current&)
 {
     for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
@@ -143,10 +123,6 @@ void MockSession::removeListener(const SessionListenerPrx& listener, const Ice::
     }
 }
 
-void MockSession::ring(const Ice::Current&)
-{
-}
-
 void MockSession::start(const Ice::Current&)
 {
     cout << "Session started." << endl;
@@ -165,10 +141,6 @@ void MockSession::stop(const ResponseCodePtr& response, const Ice::Current&)
     std::for_each(mListeners.begin(), mListeners.end(), SendStop(mMyPrx, response));
 }
 
-void MockSession::unhold(const Ice::Current&)
-{
-}
-
 void MockSession::setProxy(const SessionPrx& sessionPrx)
 {
     mMyPrx = sessionPrx;
diff --git a/test/MockSession.h b/test/MockSession.h
index 3038d5f..df4b5cf 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -34,18 +34,12 @@ public:
 
     AsteriskSCF::SessionCommunications::V1::SessionInfoPtr addListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&);
     void indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&);
-    void connect(const Ice::Current&);
-    void flash(const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx getEndpoint(const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::SessionInfoPtr getInfo(const Ice::Current&);
     AsteriskSCF::Media::V1::SessionPrx getMediaSession(const Ice::Current&);
-    void hold(const Ice::Current&);
-    void progress(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&);
     void removeListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&, const Ice::Current&);
-    void ring(const Ice::Current&);
     void start(const Ice::Current&);
     void stop(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&);
-    void unhold(const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::BridgePrx getBridge(const Ice::Current &);
     AsteriskSCF::SessionCommunications::V1::SessionInfoPtr setBridge(const AsteriskSCF::SessionCommunications::V1::BridgePrx& bridge, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current &);
     void removeBridge(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current &);

commit 8a97cd195db2ea12f4dc30494eb4e5968063126e
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 7 11:20:02 2011 -0300

    Finish migration to new indicate support.

diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 8ff99c7..ffe3b4e 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -41,7 +41,9 @@ public:
 
     void operator()(const SessionListenerPrx& l)
     {
-        l->stopped(mMyProxy, mResponse);
+	AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped(new  AsteriskSCF::SessionCommunications::V1::StoppedIndication());
+	stopped->response = mResponse;
+	l->indicated(mMyProxy, stopped);
     }
 
 private:
@@ -88,7 +90,7 @@ void MockSession::indicate(const AsteriskSCF::SessionCommunications::V1::Indicat
     {
 	for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
 	{
-	    (*i)->connected(mMyPrx);
+	    (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
 	}
     }
 }
@@ -97,7 +99,7 @@ void MockSession::connect(const Ice::Current&)
 {
     for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
     {
-        (*i)->connected(mMyPrx);
+	(*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
     }
 }
 
@@ -152,7 +154,7 @@ void MockSession::start(const Ice::Current&)
     for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
     {
         // Auto-answer!
-        (*i)->connected(mMyPrx);
+	(*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
     }
 }
 

commit 503795a461d068efff9a2edd3c6f8a685badb081
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 7 10:17:58 2011 -0300

    Add new indicate support.

diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 30abafe..71146f5 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -122,6 +122,11 @@ public:
 
 public: // The following operations are implementations of the SessionListener interface.
 
+    void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&)
+    {
+	// We do not care about anything besides stopped, so this really is fine being blank
+    }
+
     void connected(const SessionPrx& session, const Ice::Current&)
     {
     }
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index b383f61..1f026a2 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -33,6 +33,17 @@ public:
     }
 
     // Overrides
+    virtual void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
+	const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
+    {
+	AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr connected;
+
+	if ((connected = AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr::dynamicCast(indication)))
+	{
+	    mBridge->connected(session);
+	}
+    }
+
     virtual void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session, const Ice::Current&)
     {
         mBridge->connected(session);
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 31f6ea8..8ff99c7 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -80,6 +80,19 @@ SessionInfoPtr MockSession::addListener(const SessionListenerPrx& listener, cons
     return mSessionInfo;
 }
 
+void MockSession::indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
+{
+    AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr connect;
+
+    if ((connect = AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr::dynamicCast(indication)))
+    {
+	for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
+	{
+	    (*i)->connected(mMyPrx);
+	}
+    }
+}
+
 void MockSession::connect(const Ice::Current&)
 {
     for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
diff --git a/test/MockSession.h b/test/MockSession.h
index 0e59151..3038d5f 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -33,6 +33,7 @@ public:
     // Overrides
 
     AsteriskSCF::SessionCommunications::V1::SessionInfoPtr addListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&);
+    void indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&);
     void connect(const Ice::Current&);
     void flash(const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx getEndpoint(const Ice::Current&);

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list