From: Mathieu Desnoyers Date: Tue, 16 Jul 2013 00:14:07 +0000 (-0400) Subject: ust consumer: data_pending check is endpoint active X-Git-Tag: v2.2.2~13 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;ds=sidebyside;h=0b0e08f7033e791cbaa12b733ea2b1df1bb9e110;p=lttng-tools.git ust consumer: data_pending check is endpoint active Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 739cebaef..7b1c35634 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1417,6 +1417,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. */