summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fd424d9)
Both callsites of consumer_allocate_stream() set the stream's "chan"
pointer after the creation. Pass the channel directly to the stream
creation function so it can initialize the stream according to the
channel's settings.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Icea7088e7695e310585bf398e14e6443d67a30bb
channel->tracefile_size;
}
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,
uint64_t stream_key,
const char *channel_name,
uint64_t relayd_id,
+ stream->chan = channel;
stream->key = stream_key;
stream->trace_chunk = trace_chunk;
stream->out_fd = -1;
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 *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,
uint64_t stream_key,
const char *channel_name,
uint64_t relayd_id,
health_code_update();
pthread_mutex_lock(&channel->lock);
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,
fd,
channel->name,
channel->relayd_id,
goto error_add_stream_nosignal;
}
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);
new_stream->wait_fd = fd;
ret = kernctl_get_max_subbuf_size(new_stream->wait_fd,
&new_stream->max_sb_size);
assert(channel);
assert(ctx);
assert(channel);
assert(ctx);
- stream = consumer_allocate_stream(channel->key,
+ stream = consumer_allocate_stream(
+ channel,
+ channel->key,
key,
channel->name,
channel->relayd_id,
key,
channel->name,
channel->relayd_id,
}
consumer_stream_update_channel_attributes(stream, channel);
}
consumer_stream_update_channel_attributes(stream, channel);
- stream->chan = channel;