Cleanup: name of send_sessiond_channel() is misleading
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 2 May 2018 18:39:14 +0000 (14:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 2 May 2018 18:40:08 +0000 (14:40 -0400)
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 <jeremie.galarneau@efficios.com>
src/common/ust-consumer/ust-consumer.c

index b26cc19f923d23da7806be92069c395b7a99aaa3..cbad61144b1d1ec391cf1649a85672751d1311be 100644 (file)
@@ -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) {
                                /*
This page took 0.029173 seconds and 4 git commands to generate.