aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2021-08-29 16:52:10 +0200
committerMatthias Andree <matthias.andree@gmx.de>2021-08-29 17:13:07 +0200
commitd33bc06dc05fc0779488d89acdb34ac003d11d47 (patch)
tree5344810fc00999d1a0d56b9968d8a490aaff4890 /driver.c
parenta5a961e7c45fb4d1cdc700e7dcd2ff55ab2b1b51 (diff)
downloadfetchmail-d33bc06dc05fc0779488d89acdb34ac003d11d47.tar.gz
fetchmail-d33bc06dc05fc0779488d89acdb34ac003d11d47.tar.bz2
fetchmail-d33bc06dc05fc0779488d89acdb34ac003d11d47.zip
Fix IMAP protocol confusion on 2nd and subsequent polls.
This is because driver.c fails to initialize stage to STAGE_GETAUTH soon enough, and on 2nd and subsequent polls it is still STAGE_LOGOUT, and the IMAP parser does not look for the CAPABILITIES outside STAGE_GETAUTH. Reported by: Stefan Esser <se@FreeBSD.org>
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver.c b/driver.c
index 78e72df6..41cf4e0d 100644
--- a/driver.c
+++ b/driver.c
@@ -866,6 +866,7 @@ static int do_session(
SIGHANDLERTYPE alrmsave;
ctl->server.base_protocol = proto;
+ stage = STAGE_GETAUTH;
msgsizes = NULL;
pass = 0;
@@ -1159,7 +1160,6 @@ static int do_session(
goto cleanUp;
/* try to get authorized to fetch mail */
- stage = STAGE_GETAUTH;
if (ctl->server.base_protocol->getauth)
{
set_timeout(mytimeout);