... as the numerical IP address is already stored and kept in 'primary_ip'.
Closes #6534
errno, Curl_strerror(errno, buffer, sizeof(buffer)));
return;
}
- memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
#else
(void)data;
(void)conn;
if(conn->bits.tunnel_proxy || conn->bits.socksproxy)
return conn->host.name;
#endif
- return conn->ip_addr_str;
+ return conn->primary_ip;
}
static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
}
if(Curl_resolver_asynch()) {
- /* ip_addr_str[0] is NUL only if the resolving of the name hasn't
+ /* primary_ip[0] is NUL only if the resolving of the name hasn't
completed yet and until then we don't re-use this connection */
- if(!check->ip_addr_str[0]) {
+ if(!check->primary_ip[0]) {
infof(data,
"Connection #%ld is still name resolving, can't reuse\n",
check->connection_id);
#endif
conn->bits.conn_to_host ? conn->conn_to_host.dispname :
conn->host.dispname,
- conn->ip_addr_str, conn->port, conn->connection_id);
+ conn->primary_ip, conn->port, conn->connection_id);
}
#endif
struct Curl_addrinfo *ip_addr;
struct Curl_addrinfo *tempaddr[2]; /* for happy eyeballs */
- /* 'ip_addr_str' is the ip_addr data as a human readable string.
- It remains available as long as the connection does, which is longer than
- the ip_addr itself. */
- char ip_addr_str[MAX_IPADR_LEN];
-
unsigned int scope_id; /* Scope id for IPv6 */
enum {
SOCKERRNO, Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
return CURLE_BAD_FUNCTION_ARGUMENT;
}
- memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
Curl_persistconninfo(data, conn);
/* for connection reuse purposes: */