Fix: increment channel refcount on add_stream
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 23 May 2013 23:07:20 +0000 (19:07 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 28 May 2013 17:09:08 +0000 (13:09 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/kernel-consumer/kernel-consumer.c

index f3a3a22b55a230a427bad1fe7c7cb844de236d8a..f47c498777531ef6702b41d34b153abba3320e1e 100644 (file)
@@ -255,6 +255,12 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                new_stream->chan = channel;
                new_stream->wait_fd = fd;
 
                new_stream->chan = channel;
                new_stream->wait_fd = fd;
 
+               /* Metadata chan refcount is increment in add_metadata_stream */
+               if (new_stream->chan->type != CONSUMER_CHANNEL_TYPE_METADATA) {
+                       /* Update channel refcount */
+                       uatomic_inc(&new_stream->chan->refcount);
+               }
+
                /*
                 * The buffer flush is done on the session daemon side for the kernel
                 * so no need for the stream "hangup_flush_done" variable to be
                /*
                 * The buffer flush is done on the session daemon side for the kernel
                 * so no need for the stream "hangup_flush_done" variable to be
This page took 0.025834 seconds and 4 git commands to generate.