/*
* Add a stream to the global list protected by a mutex.
*/
-int consumer_add_data_stream(struct lttng_consumer_stream *stream)
+void consumer_add_data_stream(struct lttng_consumer_stream *stream)
{
struct lttng_ht *ht = data_ht;
- int ret = 0;
assert(stream);
assert(ht);
pthread_mutex_unlock(&stream->chan->timer_lock);
pthread_mutex_unlock(&stream->chan->lock);
pthread_mutex_unlock(&consumer_data.lock);
-
- return ret;
}
void consumer_del_data_stream(struct lttng_consumer_stream *stream)
* Action done with the metadata stream when adding it to the consumer internal
* data structures to handle it.
*/
-int consumer_add_metadata_stream(struct lttng_consumer_stream *stream)
+void consumer_add_metadata_stream(struct lttng_consumer_stream *stream)
{
struct lttng_ht *ht = metadata_ht;
- int ret = 0;
struct lttng_ht_iter iter;
struct lttng_ht_node_u64 *node;
pthread_mutex_unlock(&stream->chan->lock);
pthread_mutex_unlock(&stream->chan->timer_lock);
pthread_mutex_unlock(&consumer_data.lock);
- return ret;
}
/*
unsigned long consumer_get_consume_start_pos(unsigned long consumed_pos,
unsigned long produced_pos, uint64_t nb_packets_per_stream,
uint64_t max_sb_size);
-int consumer_add_data_stream(struct lttng_consumer_stream *stream);
+void consumer_add_data_stream(struct lttng_consumer_stream *stream);
void consumer_del_stream_for_data(struct lttng_consumer_stream *stream);
-int consumer_add_metadata_stream(struct lttng_consumer_stream *stream);
+void consumer_add_metadata_stream(struct lttng_consumer_stream *stream);
void consumer_del_stream_for_metadata(struct lttng_consumer_stream *stream);
int consumer_create_index_file(struct lttng_consumer_stream *stream);
/* Get the right pipe where the stream will be sent. */
if (new_stream->metadata_flag) {
- ret = consumer_add_metadata_stream(new_stream);
- if (ret) {
- ERR("Consumer add metadata stream %" PRIu64 " failed. Continuing",
- new_stream->key);
- consumer_stream_free(new_stream);
- goto end_nosignal;
- }
+ consumer_add_metadata_stream(new_stream);
stream_pipe = ctx->consumer_metadata_pipe;
} else {
- ret = consumer_add_data_stream(new_stream);
- if (ret) {
- ERR("Consumer add stream %" PRIu64 " failed. Continuing",
- new_stream->key);
- consumer_stream_free(new_stream);
- goto end_nosignal;
- }
+ consumer_add_data_stream(new_stream);
stream_pipe = ctx->consumer_data_pipe;
}
- /* Vitible to other threads */
+ /* Visible to other threads */
new_stream->globally_visible = 1;
health_code_update();
/* Get the right pipe where the stream will be sent. */
if (stream->metadata_flag) {
- ret = consumer_add_metadata_stream(stream);
- if (ret) {
- ERR("Consumer add metadata stream %" PRIu64 " failed.",
- stream->key);
- goto error;
- }
+ consumer_add_metadata_stream(stream);
stream_pipe = ctx->consumer_metadata_pipe;
} else {
- ret = consumer_add_data_stream(stream);
- if (ret) {
- ERR("Consumer add stream %" PRIu64 " failed.",
- stream->key);
- goto error;
- }
+ consumer_add_data_stream(stream);
stream_pipe = ctx->consumer_data_pipe;
}