From 03c3f6edb2b17841053250bda46fde1054d32d67 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 6 Aug 2008 21:17:19 +0000 Subject: - 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 --- cpp/src/qpid/sys/AggregateOutput.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cpp/src/qpid/sys/AggregateOutput.cpp') diff --git a/cpp/src/qpid/sys/AggregateOutput.cpp b/cpp/src/qpid/sys/AggregateOutput.cpp index 57cc0c5a33..2fad28c381 100644 --- a/cpp/src/qpid/sys/AggregateOutput.cpp +++ b/cpp/src/qpid/sys/AggregateOutput.cpp @@ -31,6 +31,12 @@ void AggregateOutput::activateOutput() control.activateOutput(); } +bool AggregateOutput::hasOutput() { + for (TaskList::const_iterator i = tasks.begin(); i != tasks.end(); ++i) + if ((*i)->hasOutput()) return true; + return false; +} + bool AggregateOutput::doOutput() { bool result = false; -- cgit v1.2.1