Fix: add index destruction in destroy stream call
authorDavid Goulet <dgoulet@efficios.com>
Fri, 27 Sep 2013 19:18:13 +0000 (15:18 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 27 Sep 2013 22:28:16 +0000 (18:28 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c

index e426469a30ebe4125b70a0bec537af3d1c8a553c..59888c280c341cc1c16a5c89d652a88802787ec2 100644 (file)
@@ -802,6 +802,9 @@ static void destroy_stream(struct relay_stream *stream,
                vstream->total_index_received = stream->total_index_received;
        }
 
+       /* Cleanup index of that stream. */
+       relay_index_destroy_by_stream_id(stream->stream_handle);
+
        iter.iter.node = &stream->stream_n.node;
        delret = lttng_ht_del(relay_streams_ht, &iter);
        assert(!delret);
@@ -841,8 +844,6 @@ void relay_delete_session(struct relay_command *cmd,
                if (stream->session == cmd->session) {
                        destroy_stream(stream, cmd->ctf_traces_ht);
                }
-               /* Cleanup index of that stream. */
-               relay_index_destroy_by_stream_id(stream->stream_handle);
        }
 
        /* Make this session not visible anymore. */
This page took 0.028316 seconds and 4 git commands to generate.