ctf: assert that request_sz in medium ops request_bytes is greater than 0
[babeltrace.git] / src / plugins / ctf / lttng-live / data-stream.c
index 79f6c3fa97cd540cbebfd1f80323c23836ef38df..3435628754de16d1810509181281247dd7700cb7 100644 (file)
@@ -58,6 +58,8 @@ enum ctf_msg_iter_medium_status medop_request_bytes(
        uint64_t len_left;
        uint64_t read_len;
 
+       BT_ASSERT(request_sz);
+
        if (stream->has_stream_hung_up) {
                status = CTF_MSG_ITER_MEDIUM_STATUS_EOF;
                goto end;
@@ -230,7 +232,7 @@ struct lttng_live_stream_iterator *lttng_live_stream_iterator_create(
 
        stream_iter->log_level = log_level;
        stream_iter->self_comp = self_comp;
-       trace = lttng_live_borrow_trace(session, ctf_trace_id);
+       trace = lttng_live_session_borrow_or_create_trace_by_id(session, ctf_trace_id);
        if (!trace) {
                BT_COMP_LOGE_APPEND_CAUSE(self_comp,
                        "Failed to borrow CTF trace.");
This page took 0.023995 seconds and 4 git commands to generate.