Commit 5b113afa authored by Paul Corke's avatar Paul Corke Committed by Rémi Denis-Courmont

httpd: correctly reads from ufd[]...

...in the case where there are multiple clients, not all of which are
waiting to be serviced.
Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
(cherry picked from commit 52193737)
parent 4b45098c
......@@ -2465,10 +2465,11 @@ retry:
/* Handle client sockets */
vlc_mutex_lock( &host->lock );
now = mdate();
nfd = host->nfd;
for( int i_client = 0; i_client < host->i_client; i_client++ )
{
httpd_client_t *cl = host->client[i_client];
const struct pollfd *pufd = &ufd[host->nfd + i_client];
const struct pollfd *pufd = &ufd[nfd];
assert( pufd < &ufd[sizeof(ufd) / sizeof(ufd[0])] );
......@@ -2502,6 +2503,8 @@ retry:
{
cl->b_read_waiting = true;
}
++nfd;
}
vlc_mutex_unlock( &host->lock );
......
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