From b35d208c616c74bda05409850fb2171002087c72 Mon Sep 17 00:00:00 2001 From: Rocco Rutte Date: Thu, 11 Sep 2008 09:28:10 +0200 Subject: [PATCH] Fix IMAP keepalive if $imap_keepalive >= $timeout --- ChangeLog | 9 +++++++++ keymap.c | 24 +++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index acd482a0..784e779a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-01 18:23 +0200 Rocco Rutte (17adea9cdff6) + + * UPDATING: Add note about locale-safe hcaches to UPDATING as it's a + user-visible change + +2008-08-31 23:36 +0200 Rocco Rutte (b6d07a662c7f) + + * ChangeLog, init.h, pager.c: Fix pager to respect $wrap_search + 2008-08-31 23:28 +0200 Rocco Rutte (f4b10e6b415c) * doc/chunk.xsl, doc/html.xsl: Backout [e5610347fb3f] for further diff --git a/keymap.c b/keymap.c index 5de29954..dbdde087 100644 --- a/keymap.c +++ b/keymap.c @@ -390,16 +390,22 @@ int km_dokey (int menu) i = Timeout > 0 ? Timeout : 60; #ifdef USE_IMAP /* keepalive may need to run more frequently than Timeout allows */ - while (ImapKeepalive && ImapKeepalive < i) + if (ImapKeepalive) { - timeout (ImapKeepalive * 1000); - tmp = mutt_getch (); - timeout (-1); - if (tmp.ch != -2) - /* something other than timeout */ - goto gotkey; - i -= ImapKeepalive; - imap_keepalive (); + if (ImapKeepalive >= i) + imap_keepalive (); + else + while (ImapKeepalive && ImapKeepalive < i) + { + timeout (ImapKeepalive * 1000); + tmp = mutt_getch (); + timeout (-1); + if (tmp.ch != -2) + /* something other than timeout */ + goto gotkey; + i -= ImapKeepalive; + imap_keepalive (); + } } #endif -- 2.40.0