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;
goto end;
}
- lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker);
- output_directory = NULL;
session->current_trace_chunk = chunk;
chunk = NULL;
end:
}
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;