X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel-consumer.c;h=3f8df6410de3fd90106e248e366d57eae33b975c;hb=2b5f1a27dceffd016755c0a62c9686c3b61f6aaa;hp=bc481e5c4cedbbfcac3818b85122a7aace36e8f7;hpb=54a3f90379492bcfa90e261922232d1a24372fd5;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/kernel-consumer.c b/src/bin/lttng-sessiond/kernel-consumer.c index bc481e5c4..3f8df6410 100644 --- a/src/bin/lttng-sessiond/kernel-consumer.c +++ b/src/bin/lttng-sessiond/kernel-consumer.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -129,7 +130,7 @@ int kernel_consumer_add_channel(struct consumer_socket *sock, /* Prep channel message structure */ consumer_init_channel_comm_msg(&lkm, LTTNG_CONSUMER_ADD_CHANNEL, - channel->fd, + channel->key, ksession->id, pathname, ksession->uid, @@ -160,7 +161,7 @@ int kernel_consumer_add_channel(struct consumer_socket *sock, status = notification_thread_command_add_channel( notification_thread_handle, session->name, ksession->uid, ksession->gid, - channel->channel->name, channel->fd, + channel->channel->name, channel->key, LTTNG_DOMAIN_KERNEL, channel->channel->attr.subbuf_size * channel->channel->attr.num_subbuf); rcu_read_unlock(); @@ -213,7 +214,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock, /* Prep channel message structure */ consumer_init_channel_comm_msg(&lkm, LTTNG_CONSUMER_ADD_CHANNEL, - session->metadata->fd, + session->metadata->key, session->id, pathname, session->uid, @@ -238,7 +239,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock, /* Prep stream message structure */ consumer_init_stream_comm_msg(&lkm, LTTNG_CONSUMER_ADD_STREAM, - session->metadata->fd, + session->metadata->key, session->metadata_stream_fd, 0); /* CPU: 0 for metadata. */ @@ -284,7 +285,7 @@ int kernel_consumer_add_stream(struct consumer_socket *sock, /* Prep stream consumer message */ consumer_init_stream_comm_msg(&lkm, LTTNG_CONSUMER_ADD_STREAM, - channel->fd, + channel->key, stream->fd, stream->cpu); @@ -438,7 +439,7 @@ int kernel_consumer_send_session(struct consumer_socket *sock, * Inform the relay that all the streams for the * channel were sent. */ - ret = kernel_consumer_streams_sent(sock, session, chan->fd); + ret = kernel_consumer_streams_sent(sock, session, chan->key); if (ret < 0) { goto error; } @@ -463,11 +464,11 @@ int kernel_consumer_destroy_channel(struct consumer_socket *socket, assert(channel); assert(socket); - DBG("Sending kernel consumer destroy channel key %d", channel->fd); + DBG("Sending kernel consumer destroy channel key %" PRIu64, channel->key); memset(&msg, 0, sizeof(msg)); msg.cmd_type = LTTNG_CONSUMER_DESTROY_CHANNEL; - msg.u.destroy_channel.key = channel->fd; + msg.u.destroy_channel.key = channel->key; pthread_mutex_lock(socket->lock); health_code_update(); @@ -492,11 +493,11 @@ int kernel_consumer_destroy_metadata(struct consumer_socket *socket, assert(metadata); assert(socket); - DBG("Sending kernel consumer destroy channel key %d", metadata->fd); + DBG("Sending kernel consumer destroy channel key %" PRIu64, metadata->key); memset(&msg, 0, sizeof(msg)); msg.cmd_type = LTTNG_CONSUMER_DESTROY_CHANNEL; - msg.u.destroy_channel.key = metadata->fd; + msg.u.destroy_channel.key = metadata->key; pthread_mutex_lock(socket->lock); health_code_update();