From: Jérémie Galarneau Date: Tue, 8 May 2018 16:07:58 +0000 (-0400) Subject: Rename consumer_init_channel_comm_msg() X-Git-Tag: v2.11.0-rc1~244 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=638e7b4ef8bf5b7f78d5c01dd3643daea8e8f084;p=lttng-tools.git Rename consumer_init_channel_comm_msg() 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 --- 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,