Build fix: missing initializer for member 'override_name'
[lttng-tools.git] / src / common / relayd / relayd.cpp
index 5148bd03a9ed241e1141add72175fcf137e63f86..12658dc6856655320203e84e8e542d97130876c5 100644 (file)
@@ -144,7 +144,7 @@ static int relayd_create_session_2_11(struct lttcomm_relayd_sock *rsock,
                const char *session_name, const char *hostname,
                const char *base_path, int session_live_timer,
                unsigned int snapshot, uint64_t sessiond_session_id,
-               const lttng_uuid sessiond_uuid, const uint64_t *current_chunk_id,
+               const lttng_uuid& sessiond_uuid, const uint64_t *current_chunk_id,
                time_t creation_time, bool session_name_contains_creation_time,
                struct lttcomm_relayd_create_session_reply_2_11 *reply,
                char *output_path)
@@ -201,7 +201,7 @@ static int relayd_create_session_2_11(struct lttcomm_relayd_sock *rsock,
        msg->live_timer = htobe32(session_live_timer);
        msg->snapshot = !!snapshot;
 
-       lttng_uuid_copy(msg->sessiond_uuid, sessiond_uuid);
+       std::copy(sessiond_uuid.begin(), sessiond_uuid.end(), msg->sessiond_uuid);
        msg->session_id = htobe64(sessiond_session_id);
        msg->session_name_contains_creation_time = session_name_contains_creation_time;
        if (current_chunk_id) {
@@ -316,7 +316,7 @@ int relayd_create_session(struct lttcomm_relayd_sock *rsock,
                const char *session_name, const char *hostname,
                const char *base_path, int session_live_timer,
                unsigned int snapshot, uint64_t sessiond_session_id,
-               const lttng_uuid sessiond_uuid,
+               const lttng_uuid& sessiond_uuid,
                const uint64_t *current_chunk_id,
                time_t creation_time, bool session_name_contains_creation_time,
                char *output_path)
@@ -1212,16 +1212,16 @@ int relayd_rotate_streams(struct lttcomm_relayd_sock *sock,
        unsigned int i;
        struct lttng_dynamic_buffer payload;
        struct lttcomm_relayd_generic_reply reply = {};
-       const struct lttcomm_relayd_rotate_streams msg = {
-               .stream_count = htobe32((uint32_t) stream_count),
-               .new_chunk_id = (typeof(msg.new_chunk_id)) {
-                       .is_set = !!new_chunk_id,
-                       .value = htobe64(new_chunk_id ? *new_chunk_id : 0),
-               },
-       };
+       struct lttcomm_relayd_rotate_streams msg;
        char new_chunk_id_buf[MAX_INT_DEC_LEN(*new_chunk_id)] = {};
        const char *new_chunk_id_str;
 
+       msg.stream_count = htobe32((uint32_t) stream_count);
+       msg.new_chunk_id = (typeof(msg.new_chunk_id)){
+               .is_set = !!new_chunk_id,
+               .value = htobe64(new_chunk_id ? *new_chunk_id : 0),
+       };
+
        if (!relayd_supports_chunks(sock)) {
                DBG("Refusing to rotate remote streams: relayd does not support chunks");
                return 0;
@@ -1346,11 +1346,9 @@ int relayd_create_trace_chunk(struct lttcomm_relayd_sock *sock,
        }
 
        chunk_name_length = overridden_name ? (strlen(chunk_name) + 1) : 0;
-       msg = (typeof(msg)){
-               .chunk_id = htobe64(chunk_id),
-               .creation_timestamp = htobe64((uint64_t) creation_timestamp),
-               .override_name_length = htobe32((uint32_t) chunk_name_length),
-       };
+       msg.chunk_id = htobe64(chunk_id);
+       msg.creation_timestamp = htobe64((uint64_t) creation_timestamp);
+       msg.override_name_length = htobe32((uint32_t) chunk_name_length);
 
        ret = lttng_dynamic_buffer_append(&payload, &msg, sizeof(msg));
        if (ret) {
This page took 0.024053 seconds and 4 git commands to generate.