X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fconsumer.c;h=57828b7208fd7dec64ec6db55065b8aaacfa71af;hb=3ef395a9e7ef9adfc3cbb7d93ab8618bcc373f70;hp=eeba2a2ab50eb5466b3b5b2aecd006eccbdfb7db;hpb=1819b04a91f69293bd30089eab70897266fe5541;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/consumer.c b/src/bin/lttng-sessiond/consumer.c index eeba2a2ab..57828b720 100644 --- a/src/bin/lttng-sessiond/consumer.c +++ b/src/bin/lttng-sessiond/consumer.c @@ -84,7 +84,6 @@ char *setup_channel_trace_path(struct consumer_output *consumer, goto error; } else if (ret >= LTTNG_PATH_MAX) { ERR("Truncation occurred while formatting channel path"); - ret = -1; goto error; } @@ -921,6 +920,7 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg, unsigned int switch_timer_interval, unsigned int read_timer_interval, unsigned int live_timer_interval, + bool is_in_live_session, unsigned int monitor_timer_interval, int output, int type, @@ -967,6 +967,7 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg, msg->u.ask_channel.switch_timer_interval = switch_timer_interval; msg->u.ask_channel.read_timer_interval = read_timer_interval; msg->u.ask_channel.live_timer_interval = live_timer_interval; + msg->u.ask_channel.is_live = is_in_live_session; msg->u.ask_channel.monitor_timer_interval = monitor_timer_interval; msg->u.ask_channel.output = output; msg->u.ask_channel.type = type; @@ -1022,6 +1023,7 @@ void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg, uint64_t tracefile_count, unsigned int monitor, unsigned int live_timer_interval, + bool is_in_live_session, unsigned int monitor_timer_interval, struct lttng_trace_chunk *trace_chunk) { @@ -1051,6 +1053,7 @@ void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg, msg->u.channel.tracefile_count = tracefile_count; msg->u.channel.monitor = monitor; msg->u.channel.live_timer_interval = live_timer_interval; + msg->u.channel.is_live = is_in_live_session; msg->u.channel.monitor_timer_interval = monitor_timer_interval; strncpy(msg->u.channel.pathname, pathname, @@ -1152,9 +1155,10 @@ int consumer_send_relayd_socket(struct consumer_socket *consumer_sock, if (type == LTTNG_STREAM_CONTROL) { char output_path[LTTNG_PATH_MAX] = {}; + uint64_t relayd_session_id; ret = relayd_create_session(rsock, - &msg.u.relayd_sock.relayd_session_id, + &relayd_session_id, session_name, hostname, base_path, session_live_timer, consumer->snapshot, session_id, @@ -1167,6 +1171,7 @@ int consumer_send_relayd_socket(struct consumer_socket *consumer_sock, (void) relayd_close(rsock); goto error; } + msg.u.relayd_sock.relayd_session_id = relayd_session_id; DBG("Created session on relay, output path reply: %s", output_path); } @@ -1189,7 +1194,7 @@ int consumer_send_relayd_socket(struct consumer_socket *consumer_sock, } DBG3("Sending relayd socket file descriptor to consumer"); - ret = consumer_send_fds(consumer_sock, &rsock->sock.fd, 1); + ret = consumer_send_fds(consumer_sock, ALIGNED_CONST_PTR(rsock->sock.fd), 1); if (ret < 0) { goto error; }