Fix: handle 0 session case in ask new streams
[babeltrace.git] / formats / lttng-live / lttng-live-comm.c
index 64fc81f6f40e34dba01ce23370cd58ab61c3776b..bcbb06aa2e0344c4baa5504a7a66964705951913 100644 (file)
@@ -594,7 +594,12 @@ restart:
                        nb_streams += ret;
                }
        }
-       ret = nb_streams;
+       if (ctx->session_ids->len == 0) {
+               /* All sessions are closed. */
+               ret = -1;
+       } else {
+               ret = nb_streams;
+       }
 
 end:
        return ret;
This page took 0.023066 seconds and 4 git commands to generate.