The 'attach' command on a viewer session expects (asserts) the trace
chunk of the viewer session to be NULL. This is reasonable as there is
no reason to hold a reference to a trace chunk while no clients are
attached.
Release the reference to the trace chunk on detach. The relay
session's trace chunk will be re-sampled (copied) when the next client
attaches to the viewer session.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
*/
viewer_stream_put(vstream);
}
-
+ lttng_trace_chunk_put(vsession->current_trace_chunk);
+ vsession->current_trace_chunk = NULL;
viewer_session_detach(vsession, session);
}