Fix: various fixes for ctf-traces/succeed test cases
[babeltrace.git] / plugins / ctf / common / notif-iter / notif-iter.c
index 5a7b325518f9e67ee697aff2b0da3e7088f17896..87e0581ddb63ef2f6b3ccf15eb582818ad92cdb1 100644 (file)
@@ -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;
This page took 0.024136 seconds and 4 git commands to generate.