consumerd: tag metadata channel as being part of a live session
[lttng-tools.git] / src / common / consumer / consumer.c
index d70a5d1d406b758e1b02cc61f22b440ee006a7b1..e2e7438f62d29a942740f37dcd255c6e9242cbf7 100644 (file)
@@ -568,7 +568,9 @@ void consumer_stream_update_channel_attributes(
                        channel->tracefile_size;
 }
 
-struct lttng_consumer_stream *consumer_allocate_stream(uint64_t channel_key,
+struct lttng_consumer_stream *consumer_allocate_stream(
+               struct lttng_consumer_channel *channel,
+               uint64_t channel_key,
                uint64_t stream_key,
                const char *channel_name,
                uint64_t relayd_id,
@@ -596,6 +598,7 @@ struct lttng_consumer_stream *consumer_allocate_stream(uint64_t channel_key,
        }
 
        rcu_read_lock();
+       stream->chan = channel;
        stream->key = stream_key;
        stream->trace_chunk = trace_chunk;
        stream->out_fd = -1;
@@ -1063,6 +1066,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
                uint64_t session_id_per_pid,
                unsigned int monitor,
                unsigned int live_timer_interval,
+               bool is_in_live_session,
                const char *root_shm_path,
                const char *shm_path)
 {
@@ -1094,6 +1098,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
        channel->tracefile_count = tracefile_count;
        channel->monitor = monitor;
        channel->live_timer_interval = live_timer_interval;
+       channel->is_live = is_in_live_session;
        pthread_mutex_init(&channel->lock, NULL);
        pthread_mutex_init(&channel->timer_lock, NULL);
 
This page took 0.023305 seconds and 4 git commands to generate.