SM's patch applied, we should not use arguments or variables that have the
same name as common functions...
This commit is contained in:
parent
f30102f038
commit
fdeaae678d
@ -308,8 +308,9 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
|
|
||||||
return CURLE_HTTP_PORT_FAILED;
|
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
|
static
|
||||||
int socketerror(int sockfd)
|
int socketerror(int sockfd)
|
||||||
{
|
{
|
||||||
@ -322,6 +323,7 @@ int socketerror(int sockfd)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TCP connect to the given host with timeout, proxy or remote doesn't matter.
|
* TCP connect to the given host with timeout, proxy or remote doesn't matter.
|
||||||
@ -331,9 +333,9 @@ int socketerror(int sockfd)
|
|||||||
|
|
||||||
CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||||
Curl_addrinfo *remotehost, /* use one in here */
|
Curl_addrinfo *remotehost, /* use one in here */
|
||||||
int port, /* connect to this */
|
int port, /* connect to this */
|
||||||
int *socket, /* the connected socket */
|
int *sockconn, /* the connected socket */
|
||||||
Curl_ipconnect **addr) /* the one we used */
|
Curl_ipconnect **addr) /* the one we used */
|
||||||
{
|
{
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
int rc;
|
int rc;
|
||||||
@ -531,7 +533,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
|||||||
if(-1 == rc) {
|
if(-1 == rc) {
|
||||||
/* no good connect was made */
|
/* no good connect was made */
|
||||||
sclose(sockfd);
|
sclose(sockfd);
|
||||||
*socket = -1;
|
*sockconn = -1;
|
||||||
return CURLE_COULDNT_CONNECT;
|
return CURLE_COULDNT_CONNECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,8 +546,8 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* allow NULL-pointers to get passed in */
|
/* allow NULL-pointers to get passed in */
|
||||||
if(socket)
|
if(sockconn)
|
||||||
*socket = sockfd; /* the socket descriptor we've connected */
|
*sockconn = sockfd; /* the socket descriptor we've connected */
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
CURLcode Curl_connecthost(struct connectdata *conn,
|
CURLcode Curl_connecthost(struct connectdata *conn,
|
||||||
Curl_addrinfo *host, /* connect to this */
|
Curl_addrinfo *host, /* connect to this */
|
||||||
long port, /* connect to this port number */
|
long port, /* connect to this port number */
|
||||||
int *socket, /* not set if error is returned */
|
int *sockconn, /* not set if error is returned */
|
||||||
Curl_ipconnect **addr /* the one we used */
|
Curl_ipconnect **addr /* the one we used */
|
||||||
); /* index we used */
|
); /* index we used */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user