summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-08-11 18:41:42 +0000
committerAlan Conway <aconway@apache.org>2008-08-11 18:41:42 +0000
commitebed79208a920e4986611e4b31f97921dbc93945 (patch)
tree6514a1f06a02e03a9b81a718e09012800c28c707 /cpp/src/qpid/cluster/ConnectionInterceptor.cpp
parent5c2e3052815e76e7565038f771cdb235e0516816 (diff)
downloadqpid-python-ebed79208a920e4986611e4b31f97921dbc93945.tar.gz
Integrate CPG file descriptor into broker polling.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@684865 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ConnectionInterceptor.cpp')
-rw-r--r--cpp/src/qpid/cluster/ConnectionInterceptor.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/cpp/src/qpid/cluster/ConnectionInterceptor.cpp b/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
index 656f05e685..81d496597a 100644
--- a/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
+++ b/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
@@ -52,6 +52,7 @@ void ConnectionInterceptor::received(framing::AMQFrame& f) {
}
void ConnectionInterceptor::deliver(framing::AMQFrame& f) {
+ // ostringstream os; os << f; printf("Received: %s\n", os.str().c_str()); // FIXME aconway 2008-08-08: remove
receivedNext(f);
}
@@ -83,16 +84,21 @@ void ConnectionInterceptor::deliverClosed() {
bool ConnectionInterceptor::doOutput() {
if (connection->hasOutput()) {
- printf("doOutput send %p\n", (void*)this);
+ QPID_LOG(debug, "Intercept doOutput, call doOutputNext"); // FIXME aconway 2008-08-08: remove
cluster.send(AMQFrame(in_place<ClusterConnectionDoOutputBody>()), this);
- }
-
+ return doOutputNext();
+ }
return false;
}
void ConnectionInterceptor::deliverDoOutput() {
- printf("doOutput deliver %p\n", (void*)this);
- doOutputNext();
+ if (isShadow()) {
+ QPID_LOG(debug, "Shadow deliver do output, call doOutputNext"); // FIXME aconway 2008-08-08: remove
+ doOutputNext();
+ }
+ else {
+ QPID_LOG(debug, "Primary deliver doOutput, ignore."); // FIXME aconway 2008-08-08: remove
+ }
}
}} // namespace qpid::cluster