Fix: sessiond: don't negate error code on list error
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index e45d4423ac0e0a51b123f2c0275e13f981c9f763..3e3169f7bb6afd594bf7ff56dc728967aabaf14e 100644 (file)
@@ -816,8 +816,7 @@ end:
        return nb_event;
 
 error:
-       /* Negate the error code to differentiate the size from an error */
-       return -ret;
+       return ret;
 }
 
 /*
@@ -2791,6 +2790,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.023731 seconds and 4 git commands to generate.