[asterisk-scf-commits] asterisk-scf/release/bridging.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu May 19 16:27:51 CDT 2011
branch "master" has been updated
via 41a1d26e130b1b0b00e8367bd3643eb8a0143758 (commit)
from da5227c2153dd14b0170af103ae4931c21137f20 (commit)
Summary of changes:
src/SessionListener.cpp | 5 +++--
src/SessionWrapper.cpp | 8 +++++++-
src/SessionWrapper.h | 1 -
3 files changed, 10 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 41a1d26e130b1b0b00e8367bd3643eb8a0143758
Author: Brent Eagles <beagles at digium.com>
Date: Thu May 19 18:55:24 2011 -0230
Modify SessionWrapper and listener behavior to avoid sending
a redundant stop() to a session that has sent a stopped indication
to the bridge.
diff --git a/src/SessionListener.cpp b/src/SessionListener.cpp
index b55ef67..ec8989a 100644
--- a/src/SessionListener.cpp
+++ b/src/SessionListener.cpp
@@ -106,7 +106,7 @@ public:
session = mSessions->getSession(source);
if (!session)
{
- mLogger(Info) << "Attempt to respond to connected notification for session with proxy "
+ mLogger(Info) << "Attempt to respond to stopped notification for session with proxy "
<< proxyString << " that does not match known sessions. Possible out of order operations.";
return;
}
@@ -118,8 +118,9 @@ public:
//
// Shutdown is handled asynchronously, so there won't be any exceptions that need to be caught here.
+ // A null response code pointer will prevent the stop indication from being sent back to this session.
//
- session->shutdown(listenerPrx, new ResponseCode);
+ session->shutdown(listenerPrx, ResponseCodePtr());
}
}
diff --git a/src/SessionWrapper.cpp b/src/SessionWrapper.cpp
index eab9bcb..ac8234b 100644
--- a/src/SessionWrapper.cpp
+++ b/src/SessionWrapper.cpp
@@ -296,7 +296,13 @@ QueuedTasks createShutdownTasks(const SessionWrapperPtr& session, const SessionL
QueuedTasks tasks;
tasks.push_back(new SetStateTask(session, Disconnected));
tasks.push_back(new RemoveBridgeTask(session, listener));
- tasks.push_back(new SessionStopTask(session, code));
+ //
+ // TODO: this should really go through a different interface.
+ //
+ if (code)
+ {
+ tasks.push_back(new SessionStopTask(session, code));
+ }
//
// TODO: These two tasks should be reversed really.
//
diff --git a/src/SessionWrapper.h b/src/SessionWrapper.h
index e0f507b..b955280 100644
--- a/src/SessionWrapper.h
+++ b/src/SessionWrapper.h
@@ -124,7 +124,6 @@ public:
void shutdown(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& code);
-
//
// TODO: Refactor so these methods don't need to be exposed.
//
-----------------------------------------------------------------------
--
asterisk-scf/release/bridging.git
More information about the asterisk-scf-commits
mailing list