From: David Goulet Date: Wed, 5 Feb 2014 21:03:35 +0000 (-0500) Subject: Fix: don't delete ctf trace while in snapshot mode X-Git-Tag: v2.4.0-rc5~34 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=50979bcd90960e8782cb4a8589aa629fdf826ed1;p=lttng-tools.git Fix: don't delete ctf trace while in snapshot mode Signed-off-by: David Goulet --- 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);