diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-10-16 00:00:01 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-10-16 00:00:01 +0000 |
commit | 4440eae5e21140db26d1450c23d3735535ce840e (patch) | |
tree | baa8a71f6943eb16806f8e9fa8ca179661b880b0 /imap.c | |
parent | e69274122db6f97b940b82df119afb165e295cf9 (diff) | |
download | fetchmail-4440eae5e21140db26d1450c23d3735535ce840e.tar.gz fetchmail-4440eae5e21140db26d1450c23d3735535ce840e.tar.bz2 fetchmail-4440eae5e21140db26d1450c23d3735535ce840e.zip |
Try to fix IMAP-K4 yet again.
svn path=/trunk/; revision=1517
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -358,6 +358,15 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) error(0, 0, "Protocol identified as IMAP4 rev 0"); } + /* eat the tail of the CAPABILITY response (if any) */ + if ((peek_capable = (imap_version >= IMAP4))) + { + char scratchbuf[POPBUFSIZE]; /* don't clobber capabilities buffer */ + + if ((ok = gen_recv(sock, scratchbuf, sizeof(scratchbuf)))) + return(ok); + } + #ifdef KERBEROS_V4 if (strstr(capabilities, "AUTH=KERBEROS_V4")) { @@ -384,11 +393,6 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) } #endif /* KERBEROS_V4 */ - /* eat the tail of the CAPABILITY response (if any) */ - if ((peek_capable = (imap_version >= IMAP4))) - if ((ok = gen_recv(sock, capabilities, sizeof(capabilities)))) - return(ok); - /* try to get authorized in the ordinary (AUTH=LOGIN) way */ ok = gen_transact(sock, "LOGIN %s \"%s\"", ctl->remotename, ctl->password); if (ok) |