From a969b13d873762a1323d98361fd37accbd7247a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 18 Jan 2009 11:29:09 +0200 Subject: [PATCH] Fix waitpipe error handling in net_Accept() from fdb990bd55f690131f00a443f187577fc82c8aa6. Spotted by Laurent. --- src/network/tcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/network/tcp.c b/src/network/tcp.c index 4f9fa36ad9..04ce2a4144 100644 --- a/src/network/tcp.c +++ b/src/network/tcp.c @@ -297,10 +297,8 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait ) ufd[i].events = POLLIN; ufd[i].revents = 0; } - if (evfd == -1) - n--; /* avoid EBADF */ - switch (poll (ufd, n, timeout)) + switch (poll (ufd, n + (evfd != -1), timeout)) { case -1: if (net_errno == EINTR) -- 2.39.2