projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Assert that index_file does not exist before setting a new one
[lttng-tools.git]
/
src
/
common
/
ust-consumer
/
ust-consumer.c
diff --git
a/src/common/ust-consumer/ust-consumer.c
b/src/common/ust-consumer/ust-consumer.c
index 76eee2ad9f56d448a9f5c9913cd86685b0279e8c..5c7b00317dabb824f378858bb05234347eec424e 100644
(file)
--- a/
src/common/ust-consumer/ust-consumer.c
+++ b/
src/common/ust-consumer/ust-consumer.c
@@
-2620,14
+2620,18
@@
int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
stream->tracefile_size_current = 0;
if (!stream->metadata_flag) {
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->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;
}
goto error;
}
- stream->index_fd = ret;
+ assert(!stream->index_file);
+ stream->index_file = index_file;
}
}
ret = 0;
}
}
ret = 0;
This page took
0.033538 seconds
and
5
git commands to generate.