Fix: relayd: tracefile rotation: viewer opening missing index file
[lttng-tools.git] / src / bin / lttng-relayd / viewer-stream.c
index 25ee35e5cadb97787a23e238dccfbcdae0924820..f3baf105bb466dd36f2edd23f69a3a535f21f556 100644 (file)
@@ -106,7 +106,7 @@ struct relay_viewer_stream *viewer_stream_create(struct relay_stream *stream,
        }
        case LTTNG_VIEWER_SEEK_LAST:
                vstream->current_tracefile_id =
-                       tracefile_array_get_file_index_head(stream->tfa);
+                       tracefile_array_get_read_file_index_head(stream->tfa);
                /*
                 * We seek at the very end of each stream, awaiting for
                 * a future packet to eventually come in.
@@ -173,7 +173,7 @@ error:
        if (vstream) {
                viewer_stream_destroy(vstream);
        }
-       if (viewer_trace_chunk) {
+       if (viewer_trace_chunk && acquired_reference) {
                lttng_trace_chunk_put(viewer_trace_chunk);
        }
        return NULL;
This page took 0.024098 seconds and 4 git commands to generate.