From: RĂ©mi Denis-Courmont Date: Sun, 18 Jan 2009 09:29:09 +0000 (+0200) Subject: Fix waitpipe error handling in net_Accept() X-Git-Tag: 1.0.0-pre1~1258 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a969b13d873762a1323d98361fd37accbd7247a1;p=vlc Fix waitpipe error handling in net_Accept() from fdb990bd55f690131f00a443f187577fc82c8aa6. Spotted by Laurent. --- 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)