relayd: create stream files relative to a session's trace chunk
[lttng-tools.git] / src / bin / lttng-sessiond / consumer.c
index 155f2b053aca8dfdfc3653c4c9bfdd7eb8f71ada..9246dc7ced5045986363355a4e67bcc30c151110 100644 (file)
@@ -315,7 +315,7 @@ error:
  * object reference is not needed anymore.
  */
 struct consumer_socket *consumer_find_socket_by_bitness(int bits,
-               struct consumer_output *consumer)
+               const struct consumer_output *consumer)
 {
        int consumer_fd;
        struct consumer_socket *socket = NULL;
@@ -348,7 +348,7 @@ end:
  * returned consumer_socket.
  */
 struct consumer_socket *consumer_find_socket(int key,
-               struct consumer_output *consumer)
+               const struct consumer_output *consumer)
 {
        struct lttng_ht_iter iter;
        struct lttng_ht_node_ulong *node;
@@ -405,7 +405,7 @@ void consumer_add_socket(struct consumer_socket *sock,
 }
 
 /*
- * Delte consumer socket to consumer output object. Read side lock must be
+ * Delete consumer socket to consumer output object. Read side lock must be
  * acquired before calling this function.
  */
 void consumer_del_socket(struct consumer_socket *sock,
@@ -1079,7 +1079,8 @@ int consumer_send_relayd_socket(struct consumer_socket *consumer_sock,
                struct lttcomm_relayd_sock *rsock, struct consumer_output *consumer,
                enum lttng_stream_type type, uint64_t session_id,
                const char *session_name, const char *hostname,
-               int session_live_timer, const uint64_t *current_chunk_id)
+               int session_live_timer, const uint64_t *current_chunk_id,
+               time_t session_creation_time)
 {
        int ret;
        struct lttcomm_consumer_msg msg;
@@ -1101,7 +1102,8 @@ int consumer_send_relayd_socket(struct consumer_socket *consumer_sock,
                                &msg.u.relayd_sock.relayd_session_id,
                                session_name, hostname, session_live_timer,
                                consumer->snapshot, session_id,
-                               sessiond_uuid, current_chunk_id);
+                               sessiond_uuid, current_chunk_id,
+                               session_creation_time);
                if (ret < 0) {
                        /* Close the control socket. */
                        (void) relayd_close(rsock);
@@ -1439,7 +1441,7 @@ end:
  * Returns LTTNG_OK on success or else an LTTng error code.
  */
 enum lttng_error_code consumer_snapshot_channel(struct consumer_socket *socket,
-               uint64_t key, const struct snapshot_output *output, int metadata,
+               uint64_t key, const struct consumer_output *output, int metadata,
                uid_t uid, gid_t gid, const char *channel_path, int wait,
                uint64_t nb_packets_per_stream)
 {
@@ -1449,7 +1451,6 @@ enum lttng_error_code consumer_snapshot_channel(struct consumer_socket *socket,
 
        assert(socket);
        assert(output);
-       assert(output->consumer);
 
        DBG("Consumer snapshot channel key %" PRIu64, key);
 
@@ -1459,9 +1460,9 @@ enum lttng_error_code consumer_snapshot_channel(struct consumer_socket *socket,
        msg.u.snapshot_channel.nb_packets_per_stream = nb_packets_per_stream;
        msg.u.snapshot_channel.metadata = metadata;
 
-       if (output->consumer->type == CONSUMER_DST_NET) {
+       if (output->type == CONSUMER_DST_NET) {
                msg.u.snapshot_channel.relayd_id =
-                               output->consumer->net_seq_index;
+                               output->net_seq_index;
                msg.u.snapshot_channel.use_relayd = 1;
        } else {
                msg.u.snapshot_channel.relayd_id = (uint64_t) -1ULL;
This page took 0.024429 seconds and 4 git commands to generate.