Fix: send per-pid session id in channel creation
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index f24b5fa3e2587039a57e4fca3eef192bc80ed6c3..46644a907a9b7bd5e659def07bcae21c2295ed7d 100644 (file)
@@ -115,13 +115,14 @@ static struct lttng_consumer_channel *allocate_channel(uint64_t session_id,
                const char *pathname, const char *name, uid_t uid, gid_t gid,
                int relayd_id, uint64_t key, enum lttng_event_output output,
                uint64_t tracefile_size, uint64_t tracefile_count,
-               unsigned int monitor)
+               uint64_t session_id_per_pid, unsigned int monitor)
 {
        assert(pathname);
        assert(name);
 
-       return consumer_allocate_channel(key, session_id, pathname, name, uid, gid,
-                       relayd_id, output, tracefile_size, tracefile_count, monitor);
+       return consumer_allocate_channel(key, session_id, pathname, name, uid,
+                       gid, relayd_id, output, tracefile_size,
+                       tracefile_count, session_id_per_pid, monitor);
 }
 
 /*
@@ -926,6 +927,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                                (enum lttng_event_output) msg.u.ask_channel.output,
                                msg.u.ask_channel.tracefile_size,
                                msg.u.ask_channel.tracefile_count,
+                               msg.u.ask_channel.session_id_per_pid,
                                msg.u.ask_channel.monitor);
                if (!channel) {
                        goto end_channel_error;
@@ -1511,10 +1513,13 @@ int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
        }
 
        request.session_id = channel->session_id;
+       request.session_id_per_pid = channel->session_id_per_pid;
        request.uid = channel->uid;
        request.key = channel->key;
-       DBG("Sending metadata request to sessiond, session %" PRIu64,
-                       channel->session_id);
+       DBG("Sending metadata request to sessiond, session id %" PRIu64
+                       ", per-pid %" PRIu64,
+                       channel->session_id,
+                       channel->session_id_per_pid);
 
        ret = lttcomm_send_unix_sock(ctx->consumer_metadata_socket, &request,
                        sizeof(request));
This page took 0.025599 seconds and 5 git commands to generate.