Fix: relayd vs consumerd compatibility
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index f89ab1a6e29adf8803c9e6158cd359fab72eb4f5..43a5d366348d98a1037ec4a9bef3024b0ba6a5e2 100644 (file)
@@ -1485,14 +1485,17 @@ int lttng_kconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
                stream->tracefile_size_current = 0;
 
                if (!stream->metadata_flag) {
-                       ret = index_create_file(stream->chan->pathname,
+                       struct lttng_index_file *index_file;
+
+                       index_file = lttng_index_file_create(stream->chan->pathname,
                                        stream->name, stream->uid, stream->gid,
                                        stream->chan->tracefile_size,
-                                       stream->tracefile_count_current);
-                       if (ret < 0) {
+                                       stream->tracefile_count_current,
+                                       CTF_INDEX_MAJOR, CTF_INDEX_MINOR);
+                       if (!index_file) {
                                goto error;
                        }
-                       stream->index_fd = ret;
+                       stream->index_file = index_file;
                }
        }
 
This page took 0.023465 seconds and 4 git commands to generate.