Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / src / bin / lttng-sessiond / clear.c
index 03abbd8e19090c55301c393936824a5bfc2a2c2d..e699caffc51ad24c6ae560aa253622beca46888f 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #define _LGPL_SOURCE
-#include <assert.h>
 #include <inttypes.h>
 #include <string.h>
 #include <unistd.h>
@@ -194,6 +193,16 @@ int cmd_clear_session(struct ltt_session *session, int *sock_fd)
                                goto end;
                        }
                }
+
+               /*
+                * 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 end;
+               }
        }
        ret = LTTNG_OK;
 end:
This page took 0.023188 seconds and 4 git commands to generate.