reply.session_id = htobe64(session->id);
+ session->current_trace_chunk =
+ sessiond_trace_chunk_registry_get_anonymous_chunk(
+ sessiond_trace_chunk_registry, sessiond_uuid,
+ session->id,
+ opt_output_path);
+ if (!session->current_trace_chunk) {
+ ret = -1;
+ }
+
send_reply:
if (ret < 0) {
reply.ret_code = htobe32(LTTNG_ERR_FATAL);
ret = session_delete(session);
assert(!ret);
+ lttng_trace_chunk_put(session->current_trace_chunk);
ret = sessiond_trace_chunk_registry_session_destroyed(
sessiond_trace_chunk_registry, session->sessiond_uuid);
assert(!ret);
+ lttng_trace_chunk_put(session->current_trace_chunk);
+ session->current_trace_chunk = NULL;
call_rcu(&session->rcu_node, rcu_destroy_session);
}
#include <lttng/constant.h>
#include <common/hashtable/hashtable.h>
#include <common/compat/uuid.h>
+#include <common/trace-chunk.h>
/*
* Represents a session for the relay point of view
* session_list_lock. Traversals are protected by RCU.
*/
struct cds_list_head viewer_session_node;
+ struct lttng_trace_chunk *current_trace_chunk;
struct rcu_head rcu_node; /* For call_rcu teardown. */
};