Add lttng_trace_format::sptr to ltt_session
[lttng-tools.git] / src / bin / lttng-sessiond / session.cpp
index a2671dbaee3ec3a40447e1fcb20b5e89ef9d87c4..75e976e0a14e7886430ccf3476698aa3e34e47cb 100644 (file)
@@ -1198,7 +1198,10 @@ end:
  * Create a new session and add it to the session list.
  * Session list lock must be held by the caller.
  */
-enum lttng_error_code session_create(const char *name, uid_t uid, gid_t gid,
+enum lttng_error_code session_create(const char *name,
+               uid_t uid,
+               gid_t gid,
+               lttng::trace_format_descriptor::uptr& trace_format,
                struct ltt_session **out_session)
 {
        int ret;
@@ -1234,6 +1237,8 @@ enum lttng_error_code session_create(const char *name, uid_t uid, gid_t gid,
        urcu_ref_init(&new_session->ref);
        pthread_mutex_init(&new_session->lock, NULL);
 
+       new_session->trace_format = std::move(trace_format);
+
        new_session->creation_time = time(NULL);
        if (new_session->creation_time == (time_t) -1) {
                PERROR("Failed to sample session creation time");
This page took 0.025172 seconds and 5 git commands to generate.