Fix: src.ctf.lttng-live: emitting stream end msg with no stream
[babeltrace.git] / src / plugins / ctf / lttng-live / lttng-live.c
index 35e1037f6569c613cfd744c819a4a1ffedc1040b..bef21b09ce38823a30456b06b06860bdfaa92c0e 100644 (file)
@@ -873,6 +873,10 @@ enum lttng_live_iterator_status lttng_live_iterator_close_stream(
                        "Error getting the next message from CTF message iterator");
                live_status = LTTNG_LIVE_ITERATOR_STATUS_ERROR;
                goto end;
+       } else if (status == CTF_MSG_ITER_STATUS_EOF) {
+               BT_COMP_LOGI("Reached the end of the live stream iterator.");
+               live_status = LTTNG_LIVE_ITERATOR_STATUS_END;
+               goto end;
        }
 
        BT_ASSERT(status == CTF_MSG_ITER_STATUS_OK);
This page took 0.02431 seconds and 4 git commands to generate.