diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-07-29 22:45:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-07-29 22:45:50 +0000 |
commit | 264a9bc6ed650375243a5ab38d323fe385ea256e (patch) | |
tree | 3cda7a12c494bb7a327b6277a88f7b5ed5eb8426 | |
parent | f79f5cbf82bc6c7e2961fcff97377adadff35b02 (diff) |
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.
-rw-r--r-- | lib/url.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -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; } |