Fix: don't delete ctf trace while in snapshot mode
authorDavid Goulet <dgoulet@efficios.com>
Wed, 5 Feb 2014 21:03:35 +0000 (16:03 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 11 Feb 2014 19:58:46 +0000 (14:58 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c

index 5b41679cba9c7310f7513e89d1f7483f9060f850..688fc1ec48e478f929537a385adab19f089f5053 100644 (file)
@@ -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);
This page took 0.027159 seconds and 4 git commands to generate.