]> granicus.if.org Git - neomutt/commitdiff
imap: fix auth login
authorMehdi Abaakouk <sileht@sileht.net>
Sun, 21 Apr 2019 14:50:00 +0000 (16:50 +0200)
committerRichard Russon <rich@flatcap.org>
Sun, 21 Apr 2019 17:16:19 +0000 (18:16 +0100)
The auth_login returns an error when it succesfully logins.

This was introduced by 04892a48ea76b37f6aa9b369b5bc4f5cc362878c

This change fixes that.

imap/auth_login.c

index 3b7058f46b4fb241fecda529ec313ccb564aba67..8bd523a4fb565200d3468da45d8aaf46a34d56c5 100644 (file)
@@ -70,7 +70,7 @@ enum ImapAuthRes imap_auth_login(struct ImapAccountData *adata, const char *meth
     mutt_debug(LL_DEBUG2, "Sending LOGIN command for %s\n", adata->conn->account.user);
 
   snprintf(buf, sizeof(buf), "LOGIN %s %s", q_user, q_pass);
-  if (imap_exec(adata, buf, IMAP_CMD_PASS) != IMAP_EXEC_SUCCESS)
+  if (imap_exec(adata, buf, IMAP_CMD_PASS) == IMAP_EXEC_SUCCESS)
   {
     mutt_clear_error(); /* clear "Logging in...".  fixes #3524 */
     return IMAP_AUTH_SUCCESS;