From: David Goulet Date: Tue, 16 Oct 2012 18:50:46 +0000 (-0400) Subject: Fix: Missing -ENODATA handling in the consumer X-Git-Tag: v2.1.0-rc5~23 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=b64403e3e8962444b688fa369338f47c86003b21 Fix: Missing -ENODATA handling in the consumer Fixes #379 Signed-off-by: David Goulet --- diff --git a/src/common/consumer.c b/src/common/consumer.c index 8b43257bd..27c870f3a 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1912,7 +1912,7 @@ restart: len = ctx->on_buffer_ready(stream, ctx); /* It's ok to have an unavailable sub-buffer */ - if (len < 0 && len != -EAGAIN) { + if (len < 0 && len != -EAGAIN && len != -ENODATA) { rcu_read_unlock(); goto end; } else if (len > 0) { @@ -2062,7 +2062,7 @@ void *lttng_consumer_thread_poll_fds(void *data) high_prio = 1; len = ctx->on_buffer_ready(local_stream[i], ctx); /* it's ok to have an unavailable sub-buffer */ - if (len < 0 && len != -EAGAIN) { + if (len < 0 && len != -EAGAIN && len != -ENODATA) { goto end; } else if (len > 0) { local_stream[i]->data_read = 1; @@ -2085,7 +2085,7 @@ void *lttng_consumer_thread_poll_fds(void *data) DBG("Normal read on fd %d", pollfd[i].fd); len = ctx->on_buffer_ready(local_stream[i], ctx); /* it's ok to have an unavailable sub-buffer */ - if (len < 0 && len != -EAGAIN) { + if (len < 0 && len != -EAGAIN && len != -ENODATA) { goto end; } else if (len > 0) { local_stream[i]->data_read = 1;