Commit 6ba06219 6ba06219c94214514427a2447c0895d2a197fbe6 by Sergey Poznyakoff

(authenticate_imap_sasl_anon): Fixed typo

in debug output.
(folder_imap_open): Issue LOGOUT if all the authentication methods
have failed.
1 parent 9500c1c5
...@@ -278,7 +278,7 @@ authenticate_imap_sasl_anon (authority_t auth) ...@@ -278,7 +278,7 @@ authenticate_imap_sasl_anon (authority_t auth)
278 if (check_capa (f_imap, "AUTH=ANONYMOUS")) 278 if (check_capa (f_imap, "AUTH=ANONYMOUS"))
279 { 279 {
280 FOLDER_DEBUG0 (folder, MU_DEBUG_PROT, 280 FOLDER_DEBUG0 (folder, MU_DEBUG_PROT,
281 "ANONYMOUS capability not present disabled\n"); 281 "ANONYMOUS capability not present\n");
282 return ENOSYS; 282 return ENOSYS;
283 } 283 }
284 284
...@@ -678,7 +678,16 @@ folder_imap_open (folder_t folder, int flags) ...@@ -678,7 +678,16 @@ folder_imap_open (folder_t folder, int flags)
678 assert (folder->authority); 678 assert (folder->authority);
679 { 679 {
680 status = authority_authenticate (folder->authority); 680 status = authority_authenticate (folder->authority);
681 CHECK_EAGAIN (f_imap, status); 681 if (status)
682 {
683 /* Fake folder_imap_close into closing the folder.
684 FIXME: The entire state machine should probably
685 be revised... */
686 f_imap->isopen++;
687 f_imap->state = IMAP_NO_STATE;
688 folder_imap_close (folder);
689 return status;
690 }
682 } 691 }
683 692
684 case IMAP_AUTH_DONE: 693 case IMAP_AUTH_DONE:
......