Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Montplaisir2012-07-09 16:00:24 -0400
committerAlexandre Montplaisir2012-07-09 16:10:09 -0400
commite21c44b00db0f21862de7219ccbb6a71cc89b0b3 (patch)
tree732962273df4c1a5db8af2465b29d7ae35766cb3
parenta5048c7c867f43ed704315a5fb4729079f0001e9 (diff)
downloadorg.eclipse.linuxtools-e21c44b00db0f21862de7219ccbb6a71cc89b0b3.tar.gz
org.eclipse.linuxtools-e21c44b00db0f21862de7219ccbb6a71cc89b0b3.tar.xz
org.eclipse.linuxtools-e21c44b00db0f21862de7219ccbb6a71cc89b0b3.zip
tmf: Do not broadcast signal if request is cancelled
The state system builder should not send the StateSystemBuildCompleted signal if the request was cancelled, since the history was never really built. refs bug #384637 Change-Id: Ie6f872b5149e4c022ad65c99e68202f8ef74f808
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java
index b819e3cb48..da2e4e2d48 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java
@@ -183,15 +183,18 @@ public class HistoryBuilder extends TmfComponent {
}
void close(boolean deleteFiles) {
+ TmfSignal doneSig;
+
sci.dispose();
if (deleteFiles) {
hb.removeFiles();
+ /* We won't broadcast the signal if the request was cancelled */
+ } else {
+ /* Broadcast the signal saying the history is done building */
+ doneSig = new TmfStateSystemBuildCompleted(this, sci.getTrace());
+ TmfSignalManager.dispatchSignal(doneSig);
}
- /* Broadcast the signal saying the history is done building */
- TmfSignal doneSig = new TmfStateSystemBuildCompleted(this, sci.getTrace());
- TmfSignalManager.dispatchSignal(doneSig);
-
TmfSignalManager.deregister(this);
}
}

Back to the top