mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
imap: Reversed the logic of the (un)successful tagged CAPABILITY response
Reversed the logic of the unsuccessful vs successful tagged CAPABILITY response in imap_state_capability_resp() to be more logical to read.
This commit is contained in:
parent
cce08581ac
commit
5b3736b533
@ -810,9 +810,8 @@ static CURLcode imap_state_capability_resp(struct connectdata *conn,
|
||||
line += wordlen;
|
||||
}
|
||||
}
|
||||
else if(imapcode != 'O')
|
||||
result = imap_state_login(conn);
|
||||
else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
|
||||
else if(imapcode == 'O') {
|
||||
if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
|
||||
/* We don't have a SSL/TLS connection yet, but SSL is requested */
|
||||
if(imapc->tls_supported)
|
||||
/* Switch to TLS connection now */
|
||||
@ -827,6 +826,9 @@ static CURLcode imap_state_capability_resp(struct connectdata *conn,
|
||||
}
|
||||
else
|
||||
result = imap_authenticate(conn);
|
||||
}
|
||||
else
|
||||
result = imap_state_login(conn);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user