]> git.lttng.org Git - lttng-tools.git/commitdiff
Fix: kernel consumer: data_pending check if endpoint active
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Jul 2013 00:12:30 +0000 (20:12 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Jul 2013 18:45:40 +0000 (14:45 -0400)
Reviewed-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/kernel-consumer/kernel-consumer.c

index 06801b9a1e8358439e483e9d6872e7bc78746719..f615067232a551679172152160c1d42dd765592b 100644 (file)
@@ -607,6 +607,11 @@ int lttng_kconsumer_data_pending(struct lttng_consumer_stream *stream)
 
        assert(stream);
 
+       if (stream->endpoint_status != CONSUMER_ENDPOINT_ACTIVE) {
+               ret = 0;
+               goto end;
+       }
+
        ret = kernctl_get_next_subbuf(stream->wait_fd);
        if (ret == 0) {
                /* There is still data so let's put back this subbuffer. */
This page took 0.031394 seconds and 4 git commands to generate.