goto error;
}
- /* A stream class should always have an existing event header type */
- assert(stream_class->event_header_type);
-
/* The event class was frozen when added to its stream class */
assert(event_class->frozen);
struct bt_ctf_field *content_size_field = NULL;
uint64_t content_size = -1, packet_size = -1;
- assert(notit->dscopes.stream_packet_context);
+ if (!notit->dscopes.stream_packet_context) {
+ goto end;
+ }
packet_size_field = bt_ctf_field_structure_get_field(
notit->dscopes.stream_packet_context, "packet_size");
struct bt_ctf_clock_class **_timestamp_end_cc)
{
int ret;
- struct bt_ctf_field *timestamp_field;
+ struct bt_ctf_field *timestamp_field = NULL;
struct bt_ctf_field *packet_context_field = NULL;
struct bt_ctf_clock_class *timestamp_begin_cc = NULL;
struct bt_ctf_clock_class *timestamp_end_cc = NULL;
BT_LOGD("Cannot retrieve the clock mapped to timestamp_begin of stream \'%s\'",
ds_file->file->path->str);
}
- bt_put(timestamp_field);
+ BT_PUT(timestamp_field);
timestamp_field = bt_ctf_field_structure_get_field_by_name(
packet_context_field, "timestamp_end");
stream_id_field = bt_ctf_field_structure_get_field_by_name(
packet_header_field, "stream_id");
if (!stream_id_field) {
- goto end;
+ goto single_stream_class;
}
ret = bt_ctf_field_unsigned_integer_get_value(stream_id_field,
ret = add_ds_file_to_ds_file_group(ctf_fs_trace,
file->path->str);
if (ret) {
- BT_LOGD("Cannot add stream file `%s` to stream file group",
+ BT_LOGE("Cannot add stream file `%s` to stream file group",
file->path->str);
ctf_fs_file_destroy(file);
goto error;