summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-06 13:30:27 +0000
committerGordon Sim <gsim@apache.org>2008-11-06 13:30:27 +0000
commit2e987bf2b0c3f9318b28c79186a35f338c90ee6c (patch)
tree56af15ac228d02d6da144fafdecee4933a1abb36 /cpp/src/qpid/sys
parent324d26687919a5e1fc3de44f2998dce700e2149a (diff)
downloadqpid-python-2e987bf2b0c3f9318b28c79186a35f338c90ee6c.tar.gz
QPID-1417: ensure there are no dangling pointers in a connections output tasks
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711855 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
-rw-r--r--cpp/src/qpid/sys/AggregateOutput.cpp5
-rw-r--r--cpp/src/qpid/sys/AggregateOutput.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/AggregateOutput.cpp b/cpp/src/qpid/sys/AggregateOutput.cpp
index 2fad28c381..d2c4b7185e 100644
--- a/cpp/src/qpid/sys/AggregateOutput.cpp
+++ b/cpp/src/qpid/sys/AggregateOutput.cpp
@@ -65,4 +65,9 @@ void AggregateOutput::removeOutputTask(OutputTask* t)
if (i != tasks.end()) tasks.erase(i);
}
+void AggregateOutput::removeAll()
+{
+ tasks.clear();
+}
+
}} // namespace qpid::sys
diff --git a/cpp/src/qpid/sys/AggregateOutput.h b/cpp/src/qpid/sys/AggregateOutput.h
index 0b08cd6f5f..9655e28c6a 100644
--- a/cpp/src/qpid/sys/AggregateOutput.h
+++ b/cpp/src/qpid/sys/AggregateOutput.h
@@ -48,6 +48,7 @@ namespace sys {
bool hasOutput();
void addOutputTask(OutputTask* t);
void removeOutputTask(OutputTask* t);
+ void removeAll();
/** Apply f to each OutputTask* in the tasks list */
template <class F> void eachOutput(F f) {