control: Bug 489857: Fix live mode support for LTTng 2.4
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Thu, 17 Mar 2016 15:27:22 +0000 (11:27 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Tue, 22 Mar 2016 10:41:42 +0000 (06:41 -0400)
Live streaming was added in 2.4.x. Since we can't retrieve whether
a session is live or not from a 2.4.x node, we copy the information
over from the session information at session creation time.

Note that this information gets lost when the user presses the refresh
button or restarts or Trace Compass.

For LTTng 2.5.0 and later it's possible to retrieve this information.
So we don't need copy this at creation time. This will make sure that
the session is recognized as live after a Trace Compass restart or a
refresh.

Change-Id: I4f07e0502de9c858a614946640305fbbcc8c27f6
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/68685
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
lttng/org.eclipse.tracecompass.lttng2.control.ui/META-INF/MANIFEST.MF
lttng/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/model/impl/TraceSessionComponent.java

index 17c9d679d112fd2af431f56f671016dfb8c9b554..0e963d6a689cb71214cb74ba9be43bc1255f239a 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.control.ui;singleton:=true
 Bundle-Activator: org.eclipse.tracecompass.internal.lttng2.control.ui.Activator
index 32de99024f45ef65d8a0c4f7a6aff3cb6a2cb027..f681545cfab9f4f53149e8258448240d3d886e75 100644 (file)
@@ -108,13 +108,32 @@ public class TraceSessionComponent extends TraceControlComponent {
     }
 
     private void copyLiveInfo(ISessionInfo sessionInfo) {
-        // Since we can't retrieve this information from the node, we copy it over
+        /*
+         * Since we can't retrieve this live port and URL from the node, we
+         * copy it over. Note that this information gets lost when the user
+         * presses the refresh button or restarts or Trace Compass.
+         */
         if (sessionInfo.getLivePort() != null) {
             fSessionInfo.setLivePort(sessionInfo.getLivePort());
         }
         if (sessionInfo.getLiveUrl() != null) {
             fSessionInfo.setLiveUrl(sessionInfo.getLiveUrl());
         }
+
+        /*
+         * Live streaming has been added in 2.4.x. Since we can't retrieve
+         * whether a session is live or not from a 2.4.x node, we copy it over.
+         * Note that this information gets lost when the user presses the
+         * refresh button or restarts or Trace Compass.
+         *
+         * For LTTng 2.5.0 and later it's possible to retrieve this information.
+         * So we don't need to copy this over be set here. This will make sure
+         * that the session is recognized as live after a Trace Compass restart
+         * or a refresh.
+         */
+        if (!getTargetNode().isVersionSupported("2.5.0")) { //$NON-NLS-1$
+            fSessionInfo.setLive(sessionInfo.isLive());
+        }
     }
 
     // ------------------------------------------------------------------------
This page took 0.027278 seconds and 5 git commands to generate.