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>
Mon, 10 Feb 2014 19:55:18 +0000 (14:55 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c

index 43d7891a21aeefc4079fd89b953836f4f425b837..482ca3e758a334052676fb5e823ed3dc5c6bc56a 100644 (file)
@@ -729,7 +729,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;
        }
@@ -1849,7 +1849,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.027194 seconds and 4 git commands to generate.