X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=3aafb519380b334099d584b83ca17d9b201ed6e1;hb=c6857fcff91346ea41a5e9ea9a1ab0fcdb19944c;hp=0005b1039cb27d6ced5dfac3537e72bbf737fce0;hpb=10a5031171c7bca5b4498c871b119e5a88b6a3fb;p=lttng-tools.git diff --git a/src/common/consumer.c b/src/common/consumer.c index 0005b1039..3aafb5193 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -292,21 +292,22 @@ void consumer_del_channel(struct lttng_consumer_channel *channel) pthread_mutex_lock(&consumer_data.lock); + /* Delete streams that might have been left in the stream list. */ + cds_list_for_each_entry_safe(stream, stmp, &channel->streams.head, + send_node) { + cds_list_del(&stream->send_node); + /* + * Once a stream is added to this list, the buffers were created so + * we have a guarantee that this call will succeed. + */ + consumer_stream_destroy(stream, NULL); + } + switch (consumer_data.type) { case LTTNG_CONSUMER_KERNEL: break; case LTTNG_CONSUMER32_UST: case LTTNG_CONSUMER64_UST: - /* Delete streams that might have been left in the stream list. */ - cds_list_for_each_entry_safe(stream, stmp, &channel->streams.head, - send_node) { - cds_list_del(&stream->send_node); - /* - * Once a stream is added to this list, the buffers were created so - * we have a guarantee that this call will succeed. - */ - consumer_stream_destroy(stream, NULL); - } lttng_ustconsumer_del_channel(channel); break; default: @@ -464,7 +465,8 @@ struct lttng_consumer_stream *consumer_allocate_stream(uint64_t channel_key, uint64_t session_id, int cpu, int *alloc_ret, - enum consumer_channel_type type) + enum consumer_channel_type type, + unsigned int monitor) { int ret; struct lttng_consumer_stream *stream; @@ -486,6 +488,7 @@ struct lttng_consumer_stream *consumer_allocate_stream(uint64_t channel_key, stream->gid = gid; stream->net_seq_idx = relayd_id; stream->session_id = session_id; + stream->monitor = monitor; pthread_mutex_init(&stream->lock, NULL); /* If channel is the metadata, flag this stream as metadata. */