*/
int cmd_recv_stream_2_11(const struct lttng_buffer_view *payload,
char **ret_path_name, char **ret_channel_name,
- uint64_t *tracefile_size, uint64_t *tracefile_count)
+ uint64_t *tracefile_size, uint64_t *tracefile_count,
+ uint64_t *trace_archive_id)
{
int ret;
struct lttcomm_relayd_add_stream_2_11 header;
header.pathname_len = be32toh(header.pathname_len);
header.tracefile_size = be64toh(header.tracefile_size);
header.tracefile_count = be64toh(header.tracefile_count);
+ header.trace_archive_id = be64toh(header.trace_archive_id);
received_names_size = header.channel_name_len + header.pathname_len;
if (payload->size < header_len + received_names_size) {
*tracefile_size = header.tracefile_size;
*tracefile_count = header.tracefile_count;
+ *trace_archive_id = header.trace_archive_id;
*ret_path_name = path_name;
*ret_channel_name = channel_name;
/* Move ownership to caller */
int cmd_recv_stream_2_11(const struct lttng_buffer_view *payload,
char **ret_path_name, char **ret_channel_name,
- uint64_t *tracefile_size, uint64_t *tracefile_count);
+ uint64_t *tracefile_size, uint64_t *tracefile_count,
+ uint64_t *trace_archive_id);
#endif /* RELAYD_CMD_2_11_H */
} else {
/* From 2.11 to ... */
ret = cmd_recv_stream_2_11(payload, &path_name,
- &channel_name, &tracefile_size, &tracefile_count);
+ &channel_name, &tracefile_size, &tracefile_count,
+ &stream_chunk_id.value);
+ stream_chunk_id.is_set = true;
}
if (ret < 0) {
pthread_mutex_lock(&relayd->ctrl_sock_mutex);
ret = relayd_add_stream(&relayd->control_sock, stream->name,
path, &stream->relayd_stream_id,
- stream->chan->tracefile_size, stream->chan->tracefile_count);
+ stream->chan->tracefile_size, stream->chan->tracefile_count,
+ stream->trace_archive_id);
pthread_mutex_unlock(&relayd->ctrl_sock_mutex);
if (ret < 0) {
goto end;
*/
int relayd_add_stream(struct lttcomm_relayd_sock *rsock, const char *channel_name,
const char *pathname, uint64_t *stream_id,
- uint64_t tracefile_size, uint64_t tracefile_count)
+ uint64_t tracefile_size, uint64_t tracefile_count,
+ uint64_t trace_archive_id)
{
int ret;
struct lttcomm_relayd_status_stream reply;
unsigned int snapshot);
int relayd_add_stream(struct lttcomm_relayd_sock *sock, const char *channel_name,
const char *pathname, uint64_t *stream_id,
- uint64_t tracefile_size, uint64_t tracefile_count);
+ uint64_t tracefile_size, uint64_t tracefile_count,
+ uint64_t trace_archive_id);
int relayd_streams_sent(struct lttcomm_relayd_sock *rsock);
int relayd_send_close_stream(struct lttcomm_relayd_sock *sock, uint64_t stream_id,
uint64_t last_net_seq_num);
uint32_t pathname_len;
uint64_t tracefile_size;
uint64_t tracefile_count;
+ uint64_t trace_archive_id;
char names[];
} LTTNG_PACKED;