From a3a86f35682d8dd69a617ded2777092de51fcf8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 2 May 2018 14:39:14 -0400 Subject: [PATCH] Cleanup: name of send_sessiond_channel() is misleading MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This function sends a channel to the sessiond _and_ to the relay daemon (if applicable). Comments are updated to reflect this change and the publication of streams towards the relay daemon is now logged. Signed-off-by: Jérémie Galarneau --- src/common/ust-consumer/ust-consumer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index b26cc19f9..cbad61144 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -540,11 +540,11 @@ error: } /* - * Send channel to sessiond. + * Send channel to sessiond and relayd if applicable. * * Return 0 on success or else a negative value. */ -static int send_sessiond_channel(int sock, +static int send_channel_to_sessiond_and_relayd(int sock, struct lttng_consumer_channel *channel, struct lttng_consumer_local_data *ctx, int *relayd_error) { @@ -564,6 +564,8 @@ static int send_sessiond_channel(int sock, health_code_update(); /* Try to send the stream to the relayd if one is available. */ + DBG("Sending stream %" PRIu64 " of channel \"%s\" to relayd", + stream->key, channel->name); ret = consumer_send_relayd_stream(stream, stream->chan->pathname); if (ret < 0) { /* @@ -1577,8 +1579,9 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, health_code_update(); - /* Send everything to sessiond. */ - ret = send_sessiond_channel(sock, channel, ctx, &relayd_err); + /* Send the channel to sessiond (and relayd, if applicable). */ + ret = send_channel_to_sessiond_and_relayd(sock, channel, ctx, + &relayd_err); if (ret < 0) { if (relayd_err) { /* -- 2.34.1