mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Renamed a few variables to avoid shadowing global declarations.
This commit is contained in:
parent
16b95fc773
commit
0bd2d54814
20
lib/ftp.c
20
lib/ftp.c
@ -130,7 +130,7 @@ static CURLcode ftp_state_post_cwd(struct connectdata *conn);
|
|||||||
static CURLcode ftp_state_quote(struct connectdata *conn,
|
static CURLcode ftp_state_quote(struct connectdata *conn,
|
||||||
bool init, ftpstate instate);
|
bool init, ftpstate instate);
|
||||||
static CURLcode ftp_nb_type(struct connectdata *conn,
|
static CURLcode ftp_nb_type(struct connectdata *conn,
|
||||||
bool ascii, ftpstate state);
|
bool ascii, ftpstate newstate);
|
||||||
static int ftp_need_type(struct connectdata *conn,
|
static int ftp_need_type(struct connectdata *conn,
|
||||||
bool ascii);
|
bool ascii);
|
||||||
|
|
||||||
@ -1013,28 +1013,28 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
|
|||||||
unsigned short ip[4];
|
unsigned short ip[4];
|
||||||
bool freeaddr = TRUE;
|
bool freeaddr = TRUE;
|
||||||
socklen_t sslen = sizeof(sa);
|
socklen_t sslen = sizeof(sa);
|
||||||
const char *ftpport = data->set.str[STRING_FTPPORT];
|
const char *ftpportstr = data->set.str[STRING_FTPPORT];
|
||||||
|
|
||||||
(void)fcmd; /* not used in the IPv4 code */
|
(void)fcmd; /* not used in the IPv4 code */
|
||||||
if(ftpport) {
|
if(ftpportstr) {
|
||||||
in_addr_t in;
|
in_addr_t in;
|
||||||
|
|
||||||
/* First check if the given name is an IP address */
|
/* First check if the given name is an IP address */
|
||||||
in=inet_addr(ftpport);
|
in=inet_addr(ftpportstr);
|
||||||
|
|
||||||
if(in != CURL_INADDR_NONE)
|
if(in != CURL_INADDR_NONE)
|
||||||
/* this is an IPv4 address */
|
/* this is an IPv4 address */
|
||||||
addr = Curl_ip2addr(in, ftpport, 0);
|
addr = Curl_ip2addr(in, ftpportstr, 0);
|
||||||
else {
|
else {
|
||||||
if(Curl_if2ip(ftpport, myhost, sizeof(myhost))) {
|
if(Curl_if2ip(ftpportstr, myhost, sizeof(myhost))) {
|
||||||
/* The interface to IP conversion provided a dotted address */
|
/* The interface to IP conversion provided a dotted address */
|
||||||
in=inet_addr(myhost);
|
in=inet_addr(myhost);
|
||||||
addr = Curl_ip2addr(in, myhost, 0);
|
addr = Curl_ip2addr(in, myhost, 0);
|
||||||
}
|
}
|
||||||
else if(strlen(ftpport)> 1) {
|
else if(strlen(ftpportstr)> 1) {
|
||||||
/* might be a host name! */
|
/* might be a host name! */
|
||||||
struct Curl_dns_entry *h=NULL;
|
struct Curl_dns_entry *h=NULL;
|
||||||
int rc = Curl_resolv(conn, ftpport, 0, &h);
|
int rc = Curl_resolv(conn, ftpportstr, 0, &h);
|
||||||
if(rc == CURLRESOLV_PENDING)
|
if(rc == CURLRESOLV_PENDING)
|
||||||
/* BLOCKING */
|
/* BLOCKING */
|
||||||
rc = Curl_wait_for_resolv(conn, &h);
|
rc = Curl_wait_for_resolv(conn, &h);
|
||||||
@ -1048,11 +1048,11 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
|
|||||||
since it points to a DNS cache entry! */
|
since it points to a DNS cache entry! */
|
||||||
} /* (h) */
|
} /* (h) */
|
||||||
else {
|
else {
|
||||||
infof(data, "Failed to resolve host name %s\n", ftpport);
|
infof(data, "Failed to resolve host name %s\n", ftpportstr);
|
||||||
}
|
}
|
||||||
} /* strlen */
|
} /* strlen */
|
||||||
} /* CURL_INADDR_NONE */
|
} /* CURL_INADDR_NONE */
|
||||||
} /* ftpport */
|
} /* ftpportstr */
|
||||||
|
|
||||||
if(!addr) {
|
if(!addr) {
|
||||||
/* pick a suitable default here */
|
/* pick a suitable default here */
|
||||||
|
@ -31,7 +31,7 @@ CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex);
|
|||||||
void Curl_gtls_close_all(struct SessionHandle *data);
|
void Curl_gtls_close_all(struct SessionHandle *data);
|
||||||
|
|
||||||
/* close a SSL connection */
|
/* close a SSL connection */
|
||||||
void Curl_gtls_close(struct connectdata *conn, int index);
|
void Curl_gtls_close(struct connectdata *conn, int sockindex);
|
||||||
|
|
||||||
/* return number of sent (non-SSL) bytes */
|
/* return number of sent (non-SSL) bytes */
|
||||||
ssize_t Curl_gtls_send(struct connectdata *conn, int sockindex,
|
ssize_t Curl_gtls_send(struct connectdata *conn, int sockindex,
|
||||||
|
@ -33,7 +33,7 @@ CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
|
|||||||
int sockindex,
|
int sockindex,
|
||||||
bool *done);
|
bool *done);
|
||||||
/* close a SSL connection */
|
/* close a SSL connection */
|
||||||
void Curl_nss_close(struct connectdata *conn, int index);
|
void Curl_nss_close(struct connectdata *conn, int sockindex);
|
||||||
|
|
||||||
/* tell NSS to close down all open information regarding connections (and
|
/* tell NSS to close down all open information regarding connections (and
|
||||||
thus session ID caching etc) */
|
thus session ID caching etc) */
|
||||||
|
Loading…
Reference in New Issue
Block a user