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:33:05 +0000 (14:33 -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 21ac08f1b4d278c3a4fd35226508e274903673ce..4f3e2871daeaa1c66faadaf64a754dccf0711b94 100644 (file)
@@ -1007,6 +1007,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.034091 seconds and 4 git commands to generate.