Fix: sessiond: don't negate error code on list error
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index 2963577563cc94aa658003e89095c95b36fdb770..0036397c3b8492ffecd51921112132479fa4caf9 100644 (file)
@@ -819,8 +819,7 @@ end:
        return nb_event;
 
 error:
-       /* Negate the error code to differentiate the size from an error */
-       return -ret;
+       return ret;
 }
 
 /*
@@ -2794,6 +2793,16 @@ int cmd_start_trace(struct ltt_session *session)
                }
        }
 
+       /*
+        * Open a packet in every stream of the session to ensure that viewers
+        * can correctly identify the boundaries of the periods during which
+        * tracing was active for this session.
+        */
+       ret = session_open_packets(session);
+       if (ret != LTTNG_OK) {
+               goto error;
+       }
+
        /*
         * Clear the flag that indicates that a rotation was done while the
         * session was stopped.
This page took 0.023795 seconds and 5 git commands to generate.