From: David Goulet Date: Tue, 18 Sep 2012 15:13:33 +0000 (-0400) Subject: Fix: Remove LPOLLNVAL from consumer metadata revents X-Git-Tag: v2.1.0-rc4~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4adabd6161a6decfcd21108b45df6959c34de74c;p=lttng-tools.git Fix: Remove LPOLLNVAL from consumer metadata revents Without epoll(7), this value does not exist in the compat layer. For now, this poll error is set within the LPOLLHUP in the poll(2) compat header and POLLNVAL of epoll is set to POLLHUP so we basically don't need it at all if we simply use the LPOLLHUP code. Signed-off-by: David Goulet --- diff --git a/src/common/consumer.c b/src/common/consumer.c index 16a6c47f4..72c820d90 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1696,7 +1696,7 @@ restart: /* Check the metadata pipe for incoming metadata. */ if (pollfd == ctx->consumer_metadata_pipe[0]) { - if (revents & (LPOLLERR | LPOLLHUP | LPOLLNVAL)) { + if (revents & (LPOLLERR | LPOLLHUP )) { DBG("Metadata thread pipe hung up"); /* * Remove the pipe from the poll set and continue the loop @@ -1776,7 +1776,7 @@ restart: * Remove the stream from the hash table since there is no data * left on the fd because we previously did a read on the buffer. */ - if (revents & (LPOLLERR | LPOLLHUP | LPOLLNVAL)) { + if (revents & (LPOLLERR | LPOLLHUP)) { DBG("Metadata fd %d is hup|err|nval.", pollfd); if (!stream->hangup_flush_done && (consumer_data.type == LTTNG_CONSUMER32_UST