From: Mathieu Desnoyers Date: Tue, 16 Jul 2013 00:12:30 +0000 (-0400) Subject: Fix: kernel consumer: data_pending check if endpoint active X-Git-Tag: v2.3.0-rc1~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=873b9e9a5a22f81225e3e5aaacb88b26ce739c68;p=lttng-tools.git Fix: kernel consumer: data_pending check if endpoint active Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index 21ac08f1b..4f3e2871d 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -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. */