summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionState.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-06 18:24:17 +0000
committerGordon Sim <gsim@apache.org>2008-11-06 18:24:17 +0000
commit54a9a26d27a59b2cc409bc7aee4c4cfcf2da8b00 (patch)
tree47e25ef79b395a8928f0692a7e8d6946d300f456 /cpp/src/qpid/broker/SessionState.cpp
parent970321b5c80f45808febad427301f0f7b6d2ea5c (diff)
downloadqpid-python-54a9a26d27a59b2cc409bc7aee4c4cfcf2da8b00.tar.gz
QPID-1413: disable output before sending detach
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711931 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionState.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionState.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp
index 7910ef3f0c..fe10345499 100644
--- a/cpp/src/qpid/broker/SessionState.cpp
+++ b/cpp/src/qpid/broker/SessionState.cpp
@@ -93,13 +93,18 @@ bool SessionState::isLocal(const ConnectionToken* t) const
void SessionState::detach() {
QPID_LOG(debug, getId() << ": detached on broker.");
- semanticState.detached();//prevents further activateOutput calls until reattached
- getConnection().outputTasks.removeOutputTask(&semanticState);
+ disableOutput();
handler = 0;
if (mgmtObject != 0)
mgmtObject->set_attached (0);
}
+void SessionState::disableOutput()
+{
+ semanticState.detached();//prevents further activateOutput calls until reattached
+ getConnection().outputTasks.removeOutputTask(&semanticState);
+}
+
void SessionState::attach(SessionHandler& h) {
QPID_LOG(debug, getId() << ": attached on broker.");
handler = &h;