return CURLE_HTTP_PORT_FAILED;
}
-#endif /* end of ipv4-specific section */
+#else /* end of ipv4-specific section */
+/* we only use socketerror() on IPv6-enabled machines */
static
int socketerror(int sockfd)
{
return err;
}
+#endif
/*
* TCP connect to the given host with timeout, proxy or remote doesn't matter.
CURLcode Curl_connecthost(struct connectdata *conn, /* context */
Curl_addrinfo *remotehost, /* use one in here */
- int port, /* connect to this */
- int *socket, /* the connected socket */
- Curl_ipconnect **addr) /* the one we used */
+ int port, /* connect to this */
+ int *sockconn, /* the connected socket */
+ Curl_ipconnect **addr) /* the one we used */
{
struct SessionHandle *data = conn->data;
int rc;
if(-1 == rc) {
/* no good connect was made */
sclose(sockfd);
- *socket = -1;
+ *sockconn = -1;
return CURLE_COULDNT_CONNECT;
}
#endif
/* allow NULL-pointers to get passed in */
- if(socket)
- *socket = sockfd; /* the socket descriptor we've connected */
+ if(sockconn)
+ *sockconn = sockfd; /* the socket descriptor we've connected */
return CURLE_OK;
}
CURLcode Curl_connecthost(struct connectdata *conn,
Curl_addrinfo *host, /* connect to this */
- long port, /* connect to this port number */
- int *socket, /* not set if error is returned */
+ long port, /* connect to this port number */
+ int *sockconn, /* not set if error is returned */
Curl_ipconnect **addr /* the one we used */
); /* index we used */
#endif