From e0b5d705f146de1c9064b11ea6e36f77e38711bd Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 28 Nov 2008 17:59:20 +0000 Subject: Added cluster log messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@721542 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/OutputInterceptor.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'cpp/src/qpid/cluster/OutputInterceptor.cpp') diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp index 68afb9bda0..0563899a1c 100644 --- a/cpp/src/qpid/cluster/OutputInterceptor.cpp +++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp @@ -46,12 +46,11 @@ void OutputInterceptor::send(framing::AMQFrame& f) { void OutputInterceptor::activateOutput() { Locker l(lock); - if (parent.isCatchUp()) next->activateOutput(); else { + QPID_LOG(trace, parent << " activateOutput - sending doOutput"); moreOutput = true; - QPID_LOG(trace, &parent << " activateOutput - sending doOutput"); sendDoOutput(); } } @@ -59,10 +58,13 @@ void OutputInterceptor::activateOutput() { // Called in write thread when the IO layer has no more data to write. // We do nothing in the write thread, we run doOutput only on delivery // of doOutput requests. -bool OutputInterceptor::doOutput() { return false; } +bool OutputInterceptor::doOutput() { + QPID_LOG(trace, parent << " write idle."); + return false; +} // Delivery of doOutput allows us to run the real connection doOutput() -// which stocks up the write buffers with data. +// which tranfers frames to the codec for writing. // void OutputInterceptor::deliverDoOutput(size_t requested) { Locker l(lock); @@ -81,20 +83,13 @@ void OutputInterceptor::deliverDoOutput(size_t requested) { QPID_LOG(trace, "Delivered doOutput: requested=" << requested << " output=" << sent << " more=" << moreOutput); if (parent.isLocal() && moreOutput) { - QPID_LOG(trace, &parent << " deliverDoOutput - sending doOutput, more output available."); + QPID_LOG(trace, parent << " deliverDoOutput - sending doOutput, more output available."); sendDoOutput(); } else doingOutput = false; } -void OutputInterceptor::startDoOutput() { - if (!doingOutput) { - QPID_LOG(trace, &parent << " startDoOutput - sending doOutput, more output available."); - sendDoOutput(); - } -} - // Send a doOutput request if one is not already in flight. void OutputInterceptor::sendDoOutput() { // Call with lock held. @@ -109,7 +104,7 @@ void OutputInterceptor::sendDoOutput() { // // FIXME aconway 2008-10-16: use ++parent.mcastSeq as sequence no,not 0 parent.getCluster().mcastControl(ClusterConnectionDeliverDoOutputBody(ProtocolVersion(), request), parent.getId(), 0); - QPID_LOG(trace, &parent << "Send doOutput request for " << request); + QPID_LOG(trace, parent << "Send doOutput request for " << request); } void OutputInterceptor::setOutputHandler(sys::ConnectionOutputHandler& h) { -- cgit v1.2.1