Commit f1554fad authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

One more sockaddr -> sockaddr_storage conversion



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5394 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2a1ec4d6
......@@ -282,7 +282,7 @@ VRT_r_now(const struct sess *sp)
/*--------------------------------------------------------------------*/
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 @@ VRT_IP_string(const struct sess *sp, const struct sockaddr *sa)
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 @@ VRT_IP_string(const struct sess *sp, const struct sockaddr *sa)
}
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);
}
......
......@@ -38,7 +38,7 @@ struct vsb;
struct cli;
struct director;
struct VCL_conf;
struct sockaddr;
struct sockaddr_storage;
/*
* A backend probe specification
......@@ -209,7 +209,7 @@ vmod_priv_fini(struct vmod_priv *p)
/* 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);
......
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