Change-Id: I8b7a55f28b746cc6b93bfb4459bfc41789d7d4f2
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8270
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12308
Tested-by: jenkins <jenkins@lttng.org>
struct ctf_fs_ds_file_group *ds_file_group = NULL;
ctf_fs_ds_file_group::UP new_ds_file_group;
int ret;
struct ctf_fs_ds_file_group *ds_file_group = NULL;
ctf_fs_ds_file_group::UP new_ds_file_group;
int ret;
- struct ctf_fs_ds_file *ds_file = NULL;
ctf_fs_ds_file_info::UP ds_file_info;
ctf_fs_ds_index::UP index;
struct ctf_msg_iter *msg_iter = NULL;
ctf_fs_ds_file_info::UP ds_file_info;
ctf_fs_ds_index::UP index;
struct ctf_msg_iter *msg_iter = NULL;
* Create a temporary ds_file to read some properties about the data
* stream file.
*/
* Create a temporary ds_file to read some properties about the data
* stream file.
*/
- ds_file =
- ctf_fs_ds_file_create(ctf_fs_trace, bt2::Stream::Shared {}, path, ctf_fs_trace->logger)
- .release();
+ const auto ds_file =
+ ctf_fs_ds_file_create(ctf_fs_trace, bt2::Stream::Shared {}, path, ctf_fs_trace->logger);
if (!ds_file) {
goto error;
}
if (!ds_file) {
goto error;
}
msg_iter = ctf_msg_iter_create(
ctf_fs_trace->metadata->tc,
bt_common_get_page_size(static_cast<int>(ctf_fs_trace->logger.level())) * 8,
msg_iter = ctf_msg_iter_create(
ctf_fs_trace->metadata->tc,
bt_common_get_page_size(static_cast<int>(ctf_fs_trace->logger.level())) * 8,
- ctf_fs_ds_file_medops, ds_file, nullptr, ctf_fs_trace->logger);
+ ctf_fs_ds_file_medops, ds_file.get(), nullptr, ctf_fs_trace->logger);
if (!msg_iter) {
BT_CPPLOGE_STR_SPEC(ctf_fs_trace->logger, "Cannot create a CTF message iterator.");
goto error;
if (!msg_iter) {
BT_CPPLOGE_STR_SPEC(ctf_fs_trace->logger, "Cannot create a CTF message iterator.");
goto error;
- index = ctf_fs_ds_file_build_index(ds_file, ds_file_info.get(), msg_iter);
+ index = ctf_fs_ds_file_build_index(ds_file.get(), ds_file_info.get(), msg_iter);
if (!index) {
BT_CPPLOGE_APPEND_CAUSE_SPEC(ctf_fs_trace->logger, "Failed to index CTF stream file \'{}\'",
ds_file->file->path);
if (!index) {
BT_CPPLOGE_APPEND_CAUSE_SPEC(ctf_fs_trace->logger, "Failed to index CTF stream file \'{}\'",
ds_file->file->path);
if (msg_iter) {
ctf_msg_iter_destroy(msg_iter);
}
if (msg_iter) {
ctf_msg_iter_destroy(msg_iter);
}