X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-stream.c;h=daed3866fc639bae297089831721d500d7f185c7;hp=cdda9412ee8df2d97395a12abc3f2cdc52dd379d;hb=3ff5c5db220d92baf64280ba54713fcafe76142e;hpb=cc280027af4d65437a30613bb63421ae8d7b199a diff --git a/src/common/consumer/consumer-stream.c b/src/common/consumer/consumer-stream.c index cdda9412e..daed3866f 100644 --- a/src/common/consumer/consumer-stream.c +++ b/src/common/consumer/consumer-stream.c @@ -594,7 +594,7 @@ int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, DBG("Opening stream output file \"%s\"", stream_path); chunk_status = lttng_trace_chunk_open_file(stream->trace_chunk, stream_path, - flags, mode, &stream->out_fd); + flags, mode, &stream->out_fd, false); if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) { ERR("Failed to open stream file \"%s\"", stream->name); ret = -1; @@ -605,15 +605,15 @@ int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, if (stream->index_file) { lttng_index_file_put(stream->index_file); } - stream->index_file = lttng_index_file_create_from_trace_chunk( + chunk_status = lttng_index_file_create_from_trace_chunk( stream->trace_chunk, stream->chan->pathname, stream->name, stream->chan->tracefile_size, stream->tracefile_count_current, CTF_INDEX_MAJOR, CTF_INDEX_MINOR, - false); - if (!stream->index_file) { + false, &stream->index_file); + if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) { ret = -1; goto end; }