Fix: snapshot with multiple UIDs
[lttng-tools.git] / src / bin / lttng-sessiond / ust-consumer.c
index d85e32aa0ce9f2a011887fd4b9a1c70e541ccca0..d6fe58cd971aa9f1f770f99860a65129c329ac76 100644 (file)
@@ -118,10 +118,12 @@ static int ask_channel_creation(struct ust_app_session *ua_sess,
        DBG2("Asking UST consumer for channel");
 
        /* Get and create full trace path of session. */
-       pathname = setup_trace_path(consumer, ua_sess);
-       if (!pathname) {
-               ret = -1;
-               goto error;
+       if (ua_sess->output_traces) {
+               pathname = setup_trace_path(consumer, ua_sess);
+               if (!pathname) {
+                       ret = -1;
+                       goto error;
+               }
        }
 
        /* Depending on the buffer type, a different channel key is used. */
@@ -159,7 +161,8 @@ static int ask_channel_creation(struct ust_app_session *ua_sess,
                        ua_chan->tracefile_size,
                        ua_chan->tracefile_count,
                        ua_sess->id,
-                       ua_sess->output_traces);
+                       ua_sess->output_traces,
+                       ua_sess->uid);
 
        health_code_update();
 
@@ -176,7 +179,9 @@ static int ask_channel_creation(struct ust_app_session *ua_sess,
        /* Communication protocol error. */
        assert(key == ua_chan->key);
        /* We need at least one where 1 stream for 1 cpu. */
-       assert(ua_chan->expected_stream_count > 0);
+       if (ua_sess->output_traces) {
+               assert(ua_chan->expected_stream_count > 0);
+       }
 
        DBG2("UST ask channel %" PRIu64 " successfully done with %u stream(s)", key,
                        ua_chan->expected_stream_count);
This page took 0.023836 seconds and 4 git commands to generate.