From ebed79208a920e4986611e4b31f97921dbc93945 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 11 Aug 2008 18:41:42 +0000 Subject: 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 --- cpp/src/qpid/cluster/ConnectionInterceptor.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'cpp/src/qpid/cluster/ConnectionInterceptor.cpp') 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()), 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 -- cgit v1.2.1