1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Removed checks for if set.fpasswd is NULL, as we prevent users from setting

it to NULL and then use the internal default instead. It will always be
a function to call.
This commit is contained in:
Daniel Stenberg 2002-07-29 22:45:50 +00:00
parent f79f5cbf82
commit 264a9bc6ed

View File

@ -1592,11 +1592,10 @@ static CURLcode CreateConnection(struct SessionHandle *data,
/* check for password, if no ask for one */
if( !data->state.proxypasswd[0] ) {
if(!data->set.fpasswd ||
data->set.fpasswd( data->set.passwd_client,
"proxy password:",
data->state.proxypasswd,
sizeof(data->state.proxypasswd))) {
if(data->set.fpasswd( data->set.passwd_client,
"proxy password:",
data->state.proxypasswd,
sizeof(data->state.proxypasswd))) {
failf(data, "Bad password from password callback");
return CURLE_BAD_PASSWORD_ENTERED;
}
@ -2171,10 +2170,9 @@ static CURLcode CreateConnection(struct SessionHandle *data,
/* if we have a user but no password, ask for one */
if(conn->bits.user_passwd &&
!data->state.passwd[0] ) {
if(!data->set.fpasswd ||
data->set.fpasswd(data->set.passwd_client,
"password:", data->state.passwd,
sizeof(data->state.passwd)))
if(data->set.fpasswd(data->set.passwd_client,
"password:", data->state.passwd,
sizeof(data->state.passwd)))
return CURLE_BAD_PASSWORD_ENTERED;
}