Commit 7d28f8a2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

network: remove useless vlc_object_waitpipe() call in net_Accept()

None of the call sites use the input thread and wait pipe.
parent a0391a08
......@@ -270,26 +270,23 @@ int net_AcceptSingle (vlc_object_t *obj, int lfd)
*/
int net_Accept (vlc_object_t *p_this, int *pi_fd)
{
int evfd = vlc_object_waitpipe (p_this);
assert (pi_fd != NULL);
unsigned n = 0;
while (pi_fd[n] != -1)
n++;
struct pollfd ufd[n + 1];
struct pollfd ufd[n];
/* Initialize file descriptor set */
for (unsigned i = 0; i <= n; i++)
for (unsigned i = 0; i < n; i++)
{
ufd[i].fd = (i < n) ? pi_fd[i] : evfd;
ufd[i].fd = pi_fd[i];
ufd[i].events = POLLIN;
}
ufd[n].revents = 0;
for (;;)
{
while (poll (ufd, n + (evfd != -1), -1) == -1)
while (poll (ufd, n, -1) == -1)
{
if (net_errno != EINTR)
{
......@@ -316,12 +313,6 @@ int net_Accept (vlc_object_t *p_this, int *pi_fd)
pi_fd[n - 1] = sfd;
return fd;
}
if (ufd[n].revents)
{
errno = EINTR;
break;
}
}
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment