From 50979bcd90960e8782cb4a8589aa629fdf826ed1 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 5 Feb 2014 16:03:35 -0500 Subject: [PATCH] Fix: don't delete ctf trace while in snapshot mode Signed-off-by: David Goulet --- src/bin/lttng-relayd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 5b41679cb..688fc1ec4 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -593,7 +593,7 @@ static void try_close_stream(struct relay_session *session, pthread_mutex_unlock(&session->viewer_ready_lock); ret = stream_close(session, stream); - if (!ret) { + if (ret || session->snapshot) { /* Already close thus the ctf trace is being or has been destroyed. */ goto end; } @@ -1713,7 +1713,7 @@ int relay_end_data_pending(struct lttcomm_relayd_hdr *recv_hdr, cds_lfht_for_each_entry(relay_streams_ht->ht, &iter.iter, stream, node.node) { if (stream->session_id == session_id && - !stream->data_pending_check_done) { + !stream->data_pending_check_done && !stream->terminated_flag) { is_data_inflight = 1; DBG("Data is still in flight for stream %" PRIu64, stream->stream_handle); -- 2.34.1