mirror of
https://github.com/moparisthebest/curl
synced 2025-01-03 18:08:02 -05:00
improved failf() error messages
This commit is contained in:
parent
f03366bcbf
commit
44985e8884
@ -345,7 +345,8 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
|
|
||||||
if(!bindworked) {
|
if(!bindworked) {
|
||||||
data->state.os_errno = Curl_ourerrno();
|
data->state.os_errno = Curl_ourerrno();
|
||||||
failf(data, "%s", Curl_strerror(conn, data->state.os_errno));
|
failf(data, "bind failure: %s",
|
||||||
|
Curl_strerror(conn, data->state.os_errno));
|
||||||
return CURLE_HTTP_PORT_FAILED;
|
return CURLE_HTTP_PORT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,13 +869,13 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (portsock == CURL_SOCKET_BAD) {
|
if (portsock == CURL_SOCKET_BAD) {
|
||||||
failf(data, "%s", Curl_strerror(conn,error));
|
failf(data, "socket failure: %s", Curl_strerror(conn,error));
|
||||||
return CURLE_FTP_PORT_FAILED;
|
return CURLE_FTP_PORT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
sslen = sizeof(ss);
|
sslen = sizeof(ss);
|
||||||
if (getsockname(portsock, sa, &sslen) < 0) {
|
if (getsockname(portsock, sa, &sslen) < 0) {
|
||||||
failf(data, "%s", Curl_strerror(conn,Curl_ourerrno()));
|
failf(data, "getsockname(): %s", Curl_strerror(conn,Curl_ourerrno()));
|
||||||
return CURLE_FTP_PORT_FAILED;
|
return CURLE_FTP_PORT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2151,7 +2151,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
|
|||||||
state(conn, FTP_STOP); /* this phase is over */
|
state(conn, FTP_STOP); /* this phase is over */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
failf(data, "%s", buf+4);
|
failf(data, "RETR response: %03d", ftpcode);
|
||||||
return CURLE_FTP_COULDNT_RETR_FILE;
|
return CURLE_FTP_COULDNT_RETR_FILE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user