diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-06-08 14:34:45 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-06-08 14:34:45 +0000 |
| commit | 4274737d8315848edc4fa0ccb534482202ce5658 (patch) | |
| tree | ef8e34f05278aa13c2e41425156a3d5a6a08ffc2 /cpp/src/qpid/broker | |
| parent | a811f1b32a6d3e1b9a39c36829ac6847ed6d8e42 (diff) | |
| download | qpid-python-4274737d8315848edc4fa0ccb534482202ce5658.tar.gz | |
Plumbed in an a connection abort operation to the OutputHandler
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782649 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
| -rw-r--r-- | cpp/src/qpid/broker/SessionState.cpp | 7 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/SessionState.h | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp index 26a35f4a4f..f5e9139a76 100644 --- a/cpp/src/qpid/broker/SessionState.cpp +++ b/cpp/src/qpid/broker/SessionState.cpp @@ -134,6 +134,11 @@ void SessionState::attach(SessionHandler& h) { } } +void SessionState::abort() { + if (isAttached()) + getConnection().outputTasks.abort(); +} + void SessionState::activateOutput() { if (isAttached()) getConnection().outputTasks.activateOutput(); @@ -213,7 +218,7 @@ struct ScheduledCreditTask : public TimerTask { sessionState.getConnection().requestIOProcessing(boost::bind(&ScheduledCreditTask::sendCredit, this)); } } - + void sendCredit() { if ( !sessionState.processSendCredit(0) ) { QPID_LOG(warning, sessionState.getId() << ": Reschedule sending credit"); diff --git a/cpp/src/qpid/broker/SessionState.h b/cpp/src/qpid/broker/SessionState.h index 880dfad99e..ef6c56ddbe 100644 --- a/cpp/src/qpid/broker/SessionState.h +++ b/cpp/src/qpid/broker/SessionState.h @@ -87,6 +87,7 @@ class SessionState : public qpid::SessionState, Broker& getBroker(); /** OutputControl **/ + void abort(); void activateOutput(); void giveReadCredit(int32_t); @@ -132,9 +133,9 @@ class SessionState : public qpid::SessionState, * This proxy is for sending such commands. In a clustered broker it will take steps * to synchronize command order across the cluster. In a stand-alone broker * it is just a synonym for getProxy() - */ + */ framing::AMQP_ClientProxy& getClusterOrderProxy(); - + Broker& broker; SessionHandler* handler; sys::AbsTime expiry; // Used by SessionManager. |
