aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-03-21 13:23:01 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-03-21 13:23:01 +0000
commitf85c9d8ce690267f9b767aaaf877c87099404c9d (patch)
treef28dfc80a20b61eb415dc7963535ea1136b030d9 /imap.c
parent1ae9b3525fcdbf175988b927f921b442412550fe (diff)
downloadfetchmail-f85c9d8ce690267f9b767aaaf877c87099404c9d.tar.gz
fetchmail-f85c9d8ce690267f9b767aaaf877c87099404c9d.tar.bz2
fetchmail-f85c9d8ce690267f9b767aaaf877c87099404c9d.zip
Attempt to fix IDLE.
svn path=/trunk/; revision=2831
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/imap.c b/imap.c
index fe8bffe7..9926dad2 100644
--- a/imap.c
+++ b/imap.c
@@ -100,7 +100,11 @@ int imap_ok(int sock, char *argbuf)
*/
if (idling)
{
- gen_send(sock, "DONE");
+ /* we do our own write and report here to disable tagging */
+ SockWrite(sock, "DONE\r\n", 6);
+ if (outlevel >= O_MONITOR)
+ report(stdout, "IMAP> DONE\n");
+
idling = FALSE;
}
}
@@ -1081,6 +1085,9 @@ static int imap_getrange(int sock,
ok = internal_expunge(sock);
count = -1;
idling = do_idle;
+ if (idling)
+ /* this is the RFC2177-recommended timeout for an IDLE */
+ mytimeout = 29 * 60;
if (ok || gen_transact(sock, do_idle ? "IDLE" : "NOOP"))
{
report(stderr, _("re-poll failed\n"));