Fix: relayd: file rotation and live read
[lttng-tools.git] / src / bin / lttng-relayd / stream.c
index d11e85b2ae7cfd79cab6712abaf50095c93cc3dd..f80296a487b8f28eb133a1d2e7614ca4fee7ff1c 100644 (file)
@@ -136,6 +136,11 @@ struct relay_stream *stream_create(struct ctf_trace *trace,
                ret = -1;
                goto end;
        }
+       stream->tfa = tracefile_array_create(stream->tracefile_count);
+       if (!stream->tfa) {
+               ret = -1;
+               goto end;
+       }
        if (stream->tracefile_size) {
                DBG("Tracefile %s/%s_0 created", stream->path_name, stream->channel_name);
        } else {
@@ -240,6 +245,9 @@ static void stream_destroy(struct relay_stream *stream)
        if (stream->indexes_ht) {
                lttng_ht_destroy(stream->indexes_ht);
        }
+       if (stream->tfa) {
+               tracefile_array_destroy(stream->tfa);
+       }
        free(stream->path_name);
        free(stream->channel_name);
        free(stream);
This page took 0.02928 seconds and 4 git commands to generate.