From 638e7b4ef8bf5b7f78d5c01dd3643daea8e8f084 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 8 May 2018 12:07:58 -0400 Subject: [PATCH] Rename consumer_init_channel_comm_msg() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit consumer_init_channel_comm_msg() is only used for the ADD_CHANNEL command. It is therefore renamed to consumer_init_add_channel_comm_msg() Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/consumer.c | 5 ++--- src/bin/lttng-sessiond/consumer.h | 3 +-- src/bin/lttng-sessiond/kernel-consumer.c | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/bin/lttng-sessiond/consumer.c b/src/bin/lttng-sessiond/consumer.c index 4a19c9347..1ed1d7f81 100644 --- a/src/bin/lttng-sessiond/consumer.c +++ b/src/bin/lttng-sessiond/consumer.c @@ -890,8 +890,7 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg, /* * Init channel communication message structure. */ -void consumer_init_channel_comm_msg(struct lttcomm_consumer_msg *msg, - enum lttng_consumer_command cmd, +void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg, uint64_t channel_key, uint64_t session_id, const char *pathname, @@ -914,7 +913,7 @@ void consumer_init_channel_comm_msg(struct lttcomm_consumer_msg *msg, memset(msg, 0, sizeof(struct lttcomm_consumer_msg)); /* Send channel */ - msg->cmd_type = cmd; + msg->cmd_type = LTTNG_CONSUMER_ADD_CHANNEL; msg->u.channel.channel_key = channel_key; msg->u.channel.session_id = session_id; msg->u.channel.uid = uid; diff --git a/src/bin/lttng-sessiond/consumer.h b/src/bin/lttng-sessiond/consumer.h index b1189cc87..1018d7aa4 100644 --- a/src/bin/lttng-sessiond/consumer.h +++ b/src/bin/lttng-sessiond/consumer.h @@ -285,8 +285,7 @@ void consumer_init_stream_comm_msg(struct lttcomm_consumer_msg *msg, void consumer_init_streams_sent_comm_msg(struct lttcomm_consumer_msg *msg, enum lttng_consumer_command cmd, uint64_t channel_key, uint64_t net_seq_idx); -void consumer_init_channel_comm_msg(struct lttcomm_consumer_msg *msg, - enum lttng_consumer_command cmd, +void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg, uint64_t channel_key, uint64_t session_id, const char *pathname, diff --git a/src/bin/lttng-sessiond/kernel-consumer.c b/src/bin/lttng-sessiond/kernel-consumer.c index 74c4b3023..ea16e1d1a 100644 --- a/src/bin/lttng-sessiond/kernel-consumer.c +++ b/src/bin/lttng-sessiond/kernel-consumer.c @@ -145,8 +145,7 @@ int kernel_consumer_add_channel(struct consumer_socket *sock, } /* Prep channel message structure */ - consumer_init_channel_comm_msg(&lkm, - LTTNG_CONSUMER_ADD_CHANNEL, + consumer_init_add_channel_comm_msg(&lkm, channel->key, ksession->id, pathname, @@ -229,8 +228,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock, } /* Prep channel message structure */ - consumer_init_channel_comm_msg(&lkm, - LTTNG_CONSUMER_ADD_CHANNEL, + consumer_init_add_channel_comm_msg(&lkm, session->metadata->key, session->id, pathname, -- 2.34.1