X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;fp=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=c9ce0d1b295b03ef641a640b85009d60ba7de099;hb=0934dd7e7c31433d5976119c05779e3800573e04;hp=97cd27d9dd02cf5022923ce2159b870f3c976156;hpb=d60962b2fd59c26410139d5203c9ec7f894f8e02;p=deliverable%2Flttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 97cd27d9d..c9ce0d1b2 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -537,7 +537,6 @@ static int send_sessiond_channel(int sock, { int ret, ret_code = LTTCOMM_CONSUMERD_SUCCESS; struct lttng_consumer_stream *stream; - uint64_t relayd_id = -1ULL; assert(channel); assert(ctx); @@ -546,25 +545,16 @@ static int send_sessiond_channel(int sock, DBG("UST consumer sending channel %s to sessiond", channel->name); if (channel->relayd_id != (uint64_t) -1ULL) { - cds_list_for_each_entry(stream, &channel->streams.head, send_node) { - - health_code_update(); - - /* Try to send the stream to the relayd if one is available. */ - ret = consumer_send_relayd_stream(stream, stream->chan->pathname); - if (ret < 0) { - /* - * Flag that the relayd was the problem here probably due to a - * communicaton error on the socket. - */ - if (relayd_error) { - *relayd_error = 1; - } - ret_code = LTTCOMM_CONSUMERD_RELAYD_FAIL; - } - if (relayd_id == -1ULL) { - relayd_id = stream->relayd_id; + ret = consumer_send_relayd_channel_bulk(channel); + if (ret < 0) { + /* + * Flag that the relayd was the problem here probably due to a + * communicaton error on the socket. + */ + if (relayd_error) { + *relayd_error = 1; } + ret_code = LTTCOMM_CONSUMERD_RELAYD_FAIL; } }