r5394 - in trunk/varnish-cache: bin/varnishd include
phk at varnish-cache.org
phk at varnish-cache.org
Mon Oct 4 11:48:34 CEST 2010
Author: phk
Date: 2010-10-04 11:48:32 +0200 (Mon, 04 Oct 2010)
New Revision: 5394
Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt.c
trunk/varnish-cache/include/vrt.h
Log:
One more sockaddr -> sockaddr_storage conversion
Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2010-10-04 09:42:11 UTC (rev 5393)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2010-10-04 09:48:32 UTC (rev 5394)
@@ -282,7 +282,7 @@
/*--------------------------------------------------------------------*/
char *
-VRT_IP_string(const struct sess *sp, const struct sockaddr *sa)
+VRT_IP_string(const struct sess *sp, const struct sockaddr_storage *sa)
{
char *p;
const struct sockaddr_in *si4;
@@ -290,7 +290,7 @@
const void *addr;
int len;
- switch (sa->sa_family) {
+ switch (sa->ss_family) {
case AF_INET:
len = INET_ADDRSTRLEN;
si4 = (const void *)sa;
@@ -306,7 +306,7 @@
}
XXXAN(len);
AN(p = WS_Alloc(sp->http->ws, len));
- AN(inet_ntop(sa->sa_family, addr, p, len));
+ AN(inet_ntop(sa->ss_family, addr, p, len));
return (p);
}
Modified: trunk/varnish-cache/include/vrt.h
===================================================================
--- trunk/varnish-cache/include/vrt.h 2010-10-04 09:42:11 UTC (rev 5393)
+++ trunk/varnish-cache/include/vrt.h 2010-10-04 09:48:32 UTC (rev 5394)
@@ -38,7 +38,7 @@
struct cli;
struct director;
struct VCL_conf;
-struct sockaddr;
+struct sockaddr_storage;
/*
* A backend probe specification
@@ -209,7 +209,7 @@
/* Convert things to string */
-char *VRT_IP_string(const struct sess *sp, const struct sockaddr *sa);
+char *VRT_IP_string(const struct sess *sp, const struct sockaddr_storage *sa);
char *VRT_int_string(const struct sess *sp, int);
char *VRT_double_string(const struct sess *sp, double);
char *VRT_time_string(const struct sess *sp, double);
More information about the varnish-commit
mailing list