diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-11-18 16:17:37 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-11-18 16:17:37 +0000 |
commit | f5e458e1c31b99e83b1bd226e2c2d061f29ee500 (patch) | |
tree | 939b7870e21960fe2cf2c1cad0a8903af73a7ea0 /mailbox | |
parent | 9f475cbb2ab9c2ec686bddbb5a74a78ce201c152 (diff) | |
download | mailutils-f5e458e1c31b99e83b1bd226e2c2d061f29ee500.tar.gz mailutils-f5e458e1c31b99e83b1bd226e2c2d061f29ee500.tar.bz2 |
(authenticate_imap_select): Use
ENOSYS as the default status value to allow MU_ERR_AUTH_FAILURE
to be propagated back to the caller.
(imap_parse): Display "NO/Bad Tagged" error diagnostics only if
status != MU_ERR_AUTH_FAILURE. Should we display it at all?
Diffstat (limited to 'mailbox')
-rw-r--r-- | mailbox/imap/folder.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mailbox/imap/folder.c b/mailbox/imap/folder.c index fa6b1b51d..5b368238f 100644 --- a/mailbox/imap/folder.c +++ b/mailbox/imap/folder.c @@ -372,9 +372,9 @@ authenticate_imap_select (authority_t auth) folder_t folder = authority_get_owner (auth); f_imap_t f_imap = folder->data; struct auth_tab *p; - int status = MU_ERR_AUTH_FAILURE; + int status = ENOSYS; - for (p = auth_tab; status && p->name; p++) + for (p = auth_tab; status == ENOSYS && p->name; p++) { f_imap->state = IMAP_AUTH; status = p->method (auth); @@ -2475,8 +2475,10 @@ imap_parse (f_imap_t f_imap) status = MU_ERR_AUTH_FAILURE; } else - status = EINVAL; - mu_error ("NO/Bad Tagged: %s %s\n", response, remainder); + { + status = EINVAL; + mu_error ("NO/Bad Tagged: %s %s\n", response, remainder); + } } } f_imap->ptr = f_imap->buffer; |