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,
}
rcu_read_lock();
+ stream->chan = channel;
stream->key = stream_key;
stream->trace_chunk = trace_chunk;
stream->out_fd = -1;
struct lttng_consumer_stream *stream,
struct lttng_consumer_channel *channel);
-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,
health_code_update();
pthread_mutex_lock(&channel->lock);
- new_stream = consumer_allocate_stream(channel->key,
+ new_stream = consumer_allocate_stream(
+ channel,
+ channel->key,
fd,
channel->name,
channel->relayd_id,
goto error_add_stream_nosignal;
}
- new_stream->chan = channel;
new_stream->wait_fd = fd;
ret = kernctl_get_max_subbuf_size(new_stream->wait_fd,
&new_stream->max_sb_size);
assert(channel);
assert(ctx);
- stream = consumer_allocate_stream(channel->key,
+ stream = consumer_allocate_stream(
+ channel,
+ channel->key,
key,
channel->name,
channel->relayd_id,
}
consumer_stream_update_channel_attributes(stream, channel);
- stream->chan = channel;
error:
if (_alloc_ret) {