* 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;
* 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;
}
/*
- * 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,
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;
&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);
* 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)
{
assert(socket);
assert(output);
- assert(output->consumer);
DBG("Consumer snapshot channel key %" PRIu64, key);
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;