Fix: relayd: harmonize path format in backward-compat mode
[lttng-tools.git] / src / bin / lttng-relayd / session.c
index f40f70965c97d6a1ceffdf85a066a7a282dd1d1c..6c30821ff1348a405816af553a7b2951120c8a5c 100644 (file)
@@ -220,6 +220,7 @@ static int session_set_anonymous_chunk(struct relay_session *session)
                goto end;
        }
 
+       lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker);
        status = lttng_trace_chunk_set_credentials_current_user(chunk);
        if (status != LTTNG_TRACE_CHUNK_STATUS_OK) {
                ret = -1;
@@ -232,8 +233,6 @@ static int session_set_anonymous_chunk(struct relay_session *session)
                goto end;
        }
 
-       lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker);
-       output_directory = NULL;
        session->current_trace_chunk = chunk;
        chunk = NULL;
 end:
@@ -344,6 +343,12 @@ struct relay_session *session_create(const char *session_name,
        }
        if (creation_time) {
                LTTNG_OPTIONAL_SET(&session->creation_time, *creation_time);
+       } else {
+               LTTNG_OPTIONAL_SET(&session->creation_time, time(NULL));
+               if (session->creation_time.value == (time_t) -1) {
+                       PERROR("Failed to sample session creation time");
+                       goto error;
+               }
        }
        session->session_name_contains_creation_time =
                        session_name_contains_creation_time;
This page took 0.025354 seconds and 5 git commands to generate.