Mailing List Archive

r1538 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2007-06-24 11:40:22 +0200 (Sun, 24 Jun 2007)
New Revision: 1538

Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor.c
Log:
Use sockaddr_storage also here.


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-06-24 09:40:09 UTC (rev 1537)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-06-24 09:40:22 UTC (rev 1538)
@@ -137,7 +137,8 @@
{
struct sess *sp;
socklen_t l;
- struct sockaddr addr[2]; /* XXX: IPv6 hack */
+ struct sockaddr_storage addr_s;
+ struct sockaddr *addr;
int i, j;
struct pollfd *pfd;
struct listen_sock *ls;
@@ -178,7 +179,8 @@
if (pfd[j].revents == 0)
continue;
VSL_stats->client_conn++;
- l = sizeof addr;
+ l = sizeof addr_s;
+ addr = (void*)&addr_s;
i = accept(pfd[j].fd, addr, &l);
if (i < 0) {
if (errno != EAGAIN) {