mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:03:40 +03:00
imap: Reversed the logic of the (un)successful tagged SELECT response
Reversed the logic of the unsuccessful vs successful tagged SELECT response in imap_state_select_resp() to be more logical to read.
This commit is contained in:
parent
5b3736b533
commit
f53ed631b3
1 changed files with 5 additions and 5 deletions
10
lib/imap.c
10
lib/imap.c
|
|
@ -1233,11 +1233,7 @@ static CURLcode imap_state_select_resp(struct connectdata *conn,
|
|||
imapc->mailbox_uidvalidity = strdup(tmp);
|
||||
}
|
||||
}
|
||||
else if(imapcode != 'O') {
|
||||
failf(data, "Select failed");
|
||||
result = CURLE_LOGIN_DENIED;
|
||||
}
|
||||
else {
|
||||
else if(imapcode == 'O') {
|
||||
/* Check if the UIDVALIDITY has been specified and matches */
|
||||
if(imap->uidvalidity && imapc->mailbox_uidvalidity &&
|
||||
strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) {
|
||||
|
|
@ -1251,6 +1247,10 @@ static CURLcode imap_state_select_resp(struct connectdata *conn,
|
|||
result = imap_fetch(conn);
|
||||
}
|
||||
}
|
||||
else {
|
||||
failf(data, "Select failed");
|
||||
result = CURLE_LOGIN_DENIED;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue