projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: don't perform an automatic session rotation in snapshot mode
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
cmd-2-11.c
diff --git
a/src/bin/lttng-relayd/cmd-2-11.c
b/src/bin/lttng-relayd/cmd-2-11.c
index eb03999cf9a4aac73b6cf0650e3bad118e3aaa14..79f439c4652ead386f140bc00a1287e668159927 100644
(file)
--- a/
src/bin/lttng-relayd/cmd-2-11.c
+++ b/
src/bin/lttng-relayd/cmd-2-11.c
@@
-31,7
+31,10
@@
int cmd_create_session_2_11(const struct lttng_buffer_view *payload,
char *session_name, char *hostname,
int cmd_create_session_2_11(const struct lttng_buffer_view *payload,
char *session_name, char *hostname,
- uint32_t *live_timer, bool *snapshot)
+ uint32_t *live_timer, bool *snapshot,
+ uint64_t *id_sessiond, lttng_uuid sessiond_uuid,
+ bool *has_current_chunk, uint64_t *current_chunk_id,
+ time_t *creation_time)
{
int ret;
struct lttcomm_relayd_create_session_2_11 header;
{
int ret;
struct lttcomm_relayd_create_session_2_11 header;
@@
-52,6
+55,11
@@
int cmd_create_session_2_11(const struct lttng_buffer_view *payload,
header.session_name_len = be32toh(header.session_name_len);
header.hostname_len = be32toh(header.hostname_len);
header.live_timer = be32toh(header.live_timer);
header.session_name_len = be32toh(header.session_name_len);
header.hostname_len = be32toh(header.hostname_len);
header.live_timer = be32toh(header.live_timer);
+ header.current_chunk_id.value = be64toh(header.current_chunk_id.value);
+ header.current_chunk_id.is_set = !!header.current_chunk_id.is_set;
+ header.creation_time = be64toh(header.creation_time);
+
+ lttng_uuid_copy(sessiond_uuid, header.sessiond_uuid);
received_names_size = header.session_name_len + header.hostname_len;
if (payload->size < header_len + received_names_size) {
received_names_size = header.session_name_len + header.hostname_len;
if (payload->size < header_len + received_names_size) {
@@
-100,6
+108,9
@@
int cmd_create_session_2_11(const struct lttng_buffer_view *payload,
*live_timer = header.live_timer;
*snapshot = !!header.snapshot;
*live_timer = header.live_timer;
*snapshot = !!header.snapshot;
+ *current_chunk_id = header.current_chunk_id.value;
+ *has_current_chunk = header.current_chunk_id.is_set;
+ *creation_time = (time_t) header.creation_time;
ret = 0;
ret = 0;
@@
-112,7
+123,8
@@
error:
*/
int cmd_recv_stream_2_11(const struct lttng_buffer_view *payload,
char **ret_path_name, char **ret_channel_name,
*/
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;
{
int ret;
struct lttcomm_relayd_add_stream_2_11 header;
@@
-136,6
+148,7
@@
int cmd_recv_stream_2_11(const struct lttng_buffer_view *payload,
header.pathname_len = be32toh(header.pathname_len);
header.tracefile_size = be64toh(header.tracefile_size);
header.tracefile_count = be64toh(header.tracefile_count);
header.pathname_len = be32toh(header.pathname_len);
header.tracefile_size = be64toh(header.tracefile_size);
header.tracefile_count = be64toh(header.tracefile_count);
+ header.trace_chunk_id = be64toh(header.trace_chunk_id);
received_names_size = header.channel_name_len + header.pathname_len;
if (payload->size < header_len + received_names_size) {
received_names_size = header.channel_name_len + header.pathname_len;
if (payload->size < header_len + received_names_size) {
@@
-182,7
+195,7
@@
int cmd_recv_stream_2_11(const struct lttng_buffer_view *payload,
goto error;
}
goto error;
}
- path_name =
create_output_path
(pathname_view.data);
+ path_name =
strdup
(pathname_view.data);
if (!path_name) {
PERROR("Path name allocation");
ret = -ENOMEM;
if (!path_name) {
PERROR("Path name allocation");
ret = -ENOMEM;
@@
-191,6
+204,7
@@
int cmd_recv_stream_2_11(const struct lttng_buffer_view *payload,
*tracefile_size = header.tracefile_size;
*tracefile_count = header.tracefile_count;
*tracefile_size = header.tracefile_size;
*tracefile_count = header.tracefile_count;
+ *trace_archive_id = header.trace_chunk_id;
*ret_path_name = path_name;
*ret_channel_name = channel_name;
/* Move ownership to caller */
*ret_path_name = path_name;
*ret_channel_name = channel_name;
/* Move ownership to caller */
This page took
0.02452 seconds
and
4
git commands to generate.