diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-03-29 22:35:23 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-03-29 22:35:23 +0000 |
commit | 4f7f5c8fd38c843c667e2b12a350094715a0627b (patch) | |
tree | a24aba94f5b1968fe8cfc2fb82713f930f7df525 | |
parent | fe4599c16098c65e693802879223081b401c6276 (diff) | |
download | fetchmail-4f7f5c8fd38c843c667e2b12a350094715a0627b.tar.gz fetchmail-4f7f5c8fd38c843c667e2b12a350094715a0627b.tar.bz2 fetchmail-4f7f5c8fd38c843c667e2b12a350094715a0627b.zip |
Another shot at making IDLE timeouts work.
svn path=/trunk/; revision=2847
-rw-r--r-- | imap.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -63,8 +63,8 @@ extern char *strstr(); /* needed on sysV68 R3V7.1. */ #define IMAP4rev1 1 /* IMAP4 rev 1, RFC2060 */ static int count, seen, recent, unseen, deletions, imap_version, preauth; -static int expunged, expunge_period; -static flag do_idle, idling; +static int expunged, expunge_period, saved_timeout; +static flag do_idle; static char capabilities[MSGBUFSIZE+1]; int imap_ok(int sock, char *argbuf) @@ -105,6 +105,7 @@ int imap_ok(int sock, char *argbuf) if (outlevel >= O_MONITOR) report(stdout, "IMAP> DONE\n"); + mytimeout = saved_timeout; stage = STAGE_FETCH; } } @@ -1086,8 +1087,8 @@ static int imap_getrange(int sock, if (do_idle) { stage = STAGE_IDLE; - /* this is the RFC2177-recommended timeout for an IDLE */ - mytimeout = 29 * 60; + saved_timeout = mytimeout; + mytimeout = 0; } if (ok || gen_transact(sock, do_idle ? "IDLE" : "NOOP")) { |