summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-08-06 21:17:19 +0000
committerAlan Conway <aconway@apache.org>2008-08-06 21:17:19 +0000
commit03c3f6edb2b17841053250bda46fde1054d32d67 (patch)
tree09f7c1d5ddbde595164414f1c0ba1d860675a315 /cpp/src/qpid/cluster/ConnectionInterceptor.cpp
parent31b2f1436808fc07f636dc02416386e44b23071c (diff)
downloadqpid-python-03c3f6edb2b17841053250bda46fde1054d32d67.tar.gz
- Added OutputTask::hasOutput() test.
- Cluster only sends doOutput events when hasOutput() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ConnectionInterceptor.cpp')
-rw-r--r--cpp/src/qpid/cluster/ConnectionInterceptor.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/qpid/cluster/ConnectionInterceptor.cpp b/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
index 32c2054631..656f05e685 100644
--- a/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
+++ b/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
@@ -82,15 +82,16 @@ void ConnectionInterceptor::deliverClosed() {
}
bool ConnectionInterceptor::doOutput() {
- cluster.send(AMQFrame(in_place<ClusterConnectionDoOutputBody>()), this);
+ if (connection->hasOutput()) {
+ printf("doOutput send %p\n", (void*)this);
+ cluster.send(AMQFrame(in_place<ClusterConnectionDoOutputBody>()), this);
+ }
+
return false;
}
void ConnectionInterceptor::deliverDoOutput() {
- // FIXME aconway 2008-07-16: review thread safety.
- // All connection processing happens in cluster queue, only read & write
- // (from mutex-locked frameQueue) happens in reader/writer threads.
- //
+ printf("doOutput deliver %p\n", (void*)this);
doOutputNext();
}