X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Fctf%2Fcommon%2Fnotif-iter%2Fnotif-iter.c;h=87e0581ddb63ef2f6b3ccf15eb582818ad92cdb1;hb=89b08333996aedb3378fc37939d489a0768bd955;hp=5a7b325518f9e67ee697aff2b0da3e7088f17896;hpb=fdf0e7a0859aac0e7a540ded801921bdb14cb450;p=babeltrace.git diff --git a/plugins/ctf/common/notif-iter/notif-iter.c b/plugins/ctf/common/notif-iter/notif-iter.c index 5a7b3255..87e0581d 100644 --- a/plugins/ctf/common/notif-iter/notif-iter.c +++ b/plugins/ctf/common/notif-iter/notif-iter.c @@ -143,9 +143,6 @@ struct bt_ctf_notif_iter { /* Visit stack */ struct stack *stack; - /* Error stream (may be NULL) */ - FILE *err_stream; - /* * Current dynamic scope field pointer. * @@ -1051,7 +1048,9 @@ enum bt_ctf_notif_iter_status set_current_packet_content_sizes( 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"); @@ -2883,8 +2882,7 @@ end: BT_HIDDEN struct bt_ctf_notif_iter *bt_ctf_notif_iter_create(struct bt_ctf_trace *trace, size_t max_request_sz, - struct bt_ctf_notif_iter_medium_ops medops, - void *data, FILE *err_stream) + struct bt_ctf_notif_iter_medium_ops medops, void *data) { int ret; struct bt_ctf_notif_iter *notit = NULL; @@ -2932,14 +2930,13 @@ struct bt_ctf_notif_iter *bt_ctf_notif_iter_create(struct bt_ctf_trace *trace, notit->medium.medops = medops; notit->medium.max_request_sz = max_request_sz; notit->medium.data = data; - notit->err_stream = err_stream; notit->stack = stack_new(notit); if (!notit->stack) { BT_LOGE_STR("Failed to create field stack."); goto error; } - notit->btr = bt_ctf_btr_create(cbs, notit, err_stream); + notit->btr = bt_ctf_btr_create(cbs, notit); if (!notit->btr) { BT_LOGE_STR("Failed to create binary type reader (BTR)."); goto error;