From a1f32ffee540bcef046dc499938585c5da9d0aa8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Nov 2010 14:51:39 +0100 Subject: ip_version: moved to connection struct The IP version choice was previously only in the UserDefined struct within the SessionHandle, but since we sometimes alter that option during a request we need to have it on a per-connection basis. I also moved more "init conn" code into the allocate_conn() function which is designed for that purpose more or less. --- lib/hostip6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/hostip6.c') diff --git a/lib/hostip6.c b/lib/hostip6.c index 7d0a9122f..ca0280790 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -112,9 +112,9 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa, * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've * been set and returns TRUE if they are OK. */ -bool Curl_ipvalid(struct SessionHandle *data) +bool Curl_ipvalid(struct connectdata *conn) { - if(data->set.ip_version == CURL_IPRESOLVE_V6) { + if(conn->ip_version == CURL_IPRESOLVE_V6) { /* see if we have an IPv6 stack */ curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0); if(s == CURL_SOCKET_BAD) @@ -174,7 +174,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, /* * Check if a limited name resolve has been requested. */ - switch(data->set.ip_version) { + switch(conn->ip_version) { case CURL_IPRESOLVE_V4: pf = PF_INET; break; -- cgit v1.2.3