From ca6b395f1a6a30bc855fa566cae98ecde5950dfe Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 15 Jul 2013 20:14:07 -0400 Subject: [PATCH] ust consumer: data_pending check is endpoint active Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- src/common/ust-consumer/ust-consumer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index abfe613a7..4c93aa7c2 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1734,6 +1734,11 @@ int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream) DBG("UST consumer checking data pending"); + if (stream->endpoint_status != CONSUMER_ENDPOINT_ACTIVE) { + ret = 0; + goto end; + } + ret = ustctl_get_next_subbuf(stream->ustream); if (ret == 0) { /* There is still data so let's put back this subbuffer. */ -- 2.34.1