]> err.no Git - varnish/commitdiff
Use sockaddr_storage also here.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 24 Jun 2007 09:40:22 +0000 (09:40 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 24 Jun 2007 09:40:22 +0000 (09:40 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1538 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor.c

index 5adea9ea4ee60e33cc847ceb5a3ec47b13971897..e59418a05ec29fd4c96db02d2315e4a946d9cfc3 100644 (file)
@@ -137,7 +137,8 @@ vca_acct(void *arg)
 {
        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 @@ vca_acct(void *arg)
                        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) {