[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "session_cookies" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Apr 26 12:21:19 CDT 2011
branch "session_cookies" has been updated
via 16dc2a0622cf510b37b158dc4f2757b6e9c0cee3 (commit)
via 5b9b4472bc3b67c0bcd31817a913dfcafa822551 (commit)
via 728136565bfcda6555d8335ae68dbc1ed3e0859f (commit)
via 2bf23eebe4d576ba355cab8b818e280267999cba (commit)
via b3ca1721ff1e4ff3f5dab1f3e18daf95246bd9fa (commit)
via 42c99da77483e81f27dd51caf997df6f3999b6f3 (commit)
via 17315ed02076c88dde9e74b93c661c255b28fffa (commit)
via 62336bb7f690b64562ccd19ed6cd370f6e47ac28 (commit)
via 6e3878b6a12ac333e817284504896984dd7bc3ee (commit)
via 8a97cd195db2ea12f4dc30494eb4e5968063126e (commit)
via 503795a461d068efff9a2edd3c6f8a685badb081 (commit)
from 1ecfe71a087fe5252d51d8e0bf95251d82f80867 (commit)
Summary of changes:
config/routingtest-integ.config.in | 4 +-
src/BasicRoutingServiceApp.cpp | 4 +-
src/EndpointRegistry.cpp | 2 +-
src/SessionRouter.cpp | 97 +++++++++++-----------------
test/MockBridge.cpp | 122 +++++++++++++++++++++---------------
test/MockBridge.h | 12 +++-
test/MockBridgeManager.cpp | 26 ++++++--
test/MockBridgeManager.h | 4 +-
test/MockSession.cpp | 37 ++++-------
test/MockSession.h | 7 +--
test/MockSessionEndpoint.cpp | 2 +-
test/TestRouting.cpp | 122 +++++++++++++++++++++--------------
12 files changed, 232 insertions(+), 207 deletions(-)
- Log -----------------------------------------------------------------
commit 16dc2a0622cf510b37b158dc4f2757b6e9c0cee3
Merge: 1ecfe71 5b9b447
Author: Joshua Colp <jcolp at digium.com>
Date: Tue Apr 26 14:07:46 2011 -0300
Merge remote branch 'origin/master' into session_cookies
Conflicts:
src/SessionRouter.cpp
test/MockBridge.cpp
test/MockSession.cpp
diff --cc src/SessionRouter.cpp
index 2f6aa6a,f492f80..4eb0779
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@@ -121,59 -121,38 +121,38 @@@ public
}
public: // The following operations are implementations of the SessionListener interface.
--
- void connected(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
- {
- }
-
- void flashed(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
- {
- }
-
- void held(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
- {
- }
-
- void progressing(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
- {
- }
-
- void ringing(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
- {
- }
-
- void stopped(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- 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& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
- {
+ void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
- const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
++ const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication,
++ const AsteriskSCF::SessionCommunications::V1::SessionCookies&, 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();
+ }
+ }
+ }
}
public:
diff --cc test/MockBridge.cpp
index 3631448,80d76ba..d50090b
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@@ -33,40 -33,15 +33,16 @@@ public
}
// Overrides
- virtual void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const Ice::Current&)
+ virtual void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
- const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
++ const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication,
++ const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
{
- mBridge->connected(session);
- }
-
- virtual void flashed(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const Ice::Current&)
- {
- }
-
- virtual void held(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const Ice::Current&)
- {
- }
-
- virtual void progressing(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
- {
- }
-
- virtual void ringing(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const Ice::Current&)
- {
- }
-
- virtual void stopped(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
- {
- }
+ AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr connected;
- virtual void unheld(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
- const Ice::Current&)
- {
+ if ((connected = AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr::dynamicCast(indication)))
+ {
+ mBridge->connected(session);
+ }
}
private:
diff --cc test/MockSession.cpp
index fa79540,be48767..8eb66d2
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@@ -41,7 -41,9 +41,9 @@@ public
void operator()(const SessionListenerPrx& l)
{
- l->stopped(mMyProxy, AsteriskSCF::SessionCommunications::V1::SessionCookies(), mResponse);
+ AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped(new AsteriskSCF::SessionCommunications::V1::StoppedIndication());
+ stopped->response = mResponse;
- l->indicated(mMyProxy, stopped);
++ l->indicated(mMyProxy, stopped, AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
private:
@@@ -80,11 -82,16 +82,16 @@@ SessionInfoPtr MockSession::addListener
return mSessionInfo;
}
- void MockSession::connect(const Ice::Current&)
+ void MockSession::indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
{
- for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
+ AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr connect;
+
+ if ((connect = AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr::dynamicCast(indication)))
{
- (*i)->connected(mMyPrx, AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
+ {
- (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
++ (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication(), AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ }
}
}
@@@ -139,7 -130,7 +130,7 @@@ void MockSession::start(const Ice::Curr
for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
{
// Auto-answer!
- (*i)->connected(mMyPrx, AsteriskSCF::SessionCommunications::V1::SessionCookies());
- (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
++ (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication(), AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
}
-----------------------------------------------------------------------
--
asterisk-scf/integration/routing.git
More information about the asterisk-scf-commits
mailing list