(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?
Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -372,9 +372,9 @@ authenticate_imap_select (authority_t auth) | ... | @@ -372,9 +372,9 @@ authenticate_imap_select (authority_t auth) |
372 | folder_t folder = authority_get_owner (auth); | 372 | folder_t folder = authority_get_owner (auth); |
373 | f_imap_t f_imap = folder->data; | 373 | f_imap_t f_imap = folder->data; |
374 | struct auth_tab *p; | 374 | struct auth_tab *p; |
375 | int status = MU_ERR_AUTH_FAILURE; | 375 | int status = ENOSYS; |
376 | 376 | ||
377 | for (p = auth_tab; status && p->name; p++) | 377 | for (p = auth_tab; status == ENOSYS && p->name; p++) |
378 | { | 378 | { |
379 | f_imap->state = IMAP_AUTH; | 379 | f_imap->state = IMAP_AUTH; |
380 | status = p->method (auth); | 380 | status = p->method (auth); |
... | @@ -2475,10 +2475,12 @@ imap_parse (f_imap_t f_imap) | ... | @@ -2475,10 +2475,12 @@ imap_parse (f_imap_t f_imap) |
2475 | status = MU_ERR_AUTH_FAILURE; | 2475 | status = MU_ERR_AUTH_FAILURE; |
2476 | } | 2476 | } |
2477 | else | 2477 | else |
2478 | { | ||
2478 | status = EINVAL; | 2479 | status = EINVAL; |
2479 | mu_error ("NO/Bad Tagged: %s %s\n", response, remainder); | 2480 | mu_error ("NO/Bad Tagged: %s %s\n", response, remainder); |
2480 | } | 2481 | } |
2481 | } | 2482 | } |
2483 | } | ||
2482 | f_imap->ptr = f_imap->buffer; | 2484 | f_imap->ptr = f_imap->buffer; |
2483 | } | 2485 | } |
2484 | 2486 | ... | ... |
-
Please register or sign in to post a comment