[vlc-devel] commit: httpd: correctly reads from ufd[]... (Paul Corke )
git version control
git at videolan.org
Wed Nov 12 17:11:23 CET 2008
vlc | branch: master | Paul Corke <paulc at datatote.co.uk> | Tue Nov 11 10:05:45 2008 +0000| [52193737a575d2e26e7be17cf5ca78f9a063a2b5] | committer: 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: Rémi Denis-Courmont <rdenis at simphalempin.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=52193737a575d2e26e7be17cf5ca78f9a063a2b5
---
src/network/httpd.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 546a77e..0e5406b 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -2464,10 +2464,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])] );
@@ -2501,6 +2502,8 @@ retry:
{
cl->b_read_waiting = true;
}
+
+ ++nfd;
}
vlc_mutex_unlock( &host->lock );
More information about the vlc-devel
mailing list