aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-10-26 19:57:45 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-10-26 19:57:45 +0000
commit836bbce0c428581f40d13d8c3d27d1c7adc31ccb (patch)
tree3d03fdd0b5bdda66ef27bf852cac646968968882 /imap.c
parentbcc60aebf68fd7839c708a623048636a03f05043 (diff)
downloadfetchmail-836bbce0c428581f40d13d8c3d27d1c7adc31ccb.tar.gz
fetchmail-836bbce0c428581f40d13d8c3d27d1c7adc31ccb.tar.bz2
fetchmail-836bbce0c428581f40d13d8c3d27d1c7adc31ccb.zip
Jonathan T. Agnew's massive code cleanup.
svn path=/trunk/; revision=2137
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/imap.c b/imap.c
index 8dbe59a7..94ae0529 100644
--- a/imap.c
+++ b/imap.c
@@ -44,7 +44,7 @@ extern char *strstr(); /* needed on sysV68 R3V7.1. */
#define IMAP4 0 /* IMAP4 rev 0, RFC1730 */
#define IMAP4rev1 1 /* IMAP4 rev 1, RFC2060 */
-static int count, seen, recent, unseen, deletions,expunged, imap_version;
+static int count, seen, recent, unseen, deletions, expunged, imap_version;
static char capabilities[MSGBUFSIZE+1];
int imap_ok(int sock, char *argbuf)
@@ -113,7 +113,9 @@ int imap_ok(int sock, char *argbuf)
strcpy(argbuf, cp);
return(PS_SUCCESS);
}
- else if (strncmp(cp, "BAD", 2) == 0)
+ else if (strncmp(cp, "BAD", 3) == 0)
+ return(PS_ERROR);
+ else if (strncmp(cp, "NO", 2) == 0)
return(PS_ERROR);
else
return(PS_PROTOCOL);
@@ -665,7 +667,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
return(ok);
}
- /* else fall through to ourdinary AUTH=LOGIN case */
+ /* else fall through to ordinary AUTH=LOGIN case */
}
else if (ctl->server.protocol == P_IMAP_K4)
{