]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-hibernate: fix input_pending check in client_unhibernate_cmp
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Wed, 17 Aug 2016 14:57:16 +0000 (17:57 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 17 Aug 2016 15:24:32 +0000 (18:24 +0300)
Check c2->input_pending instead of c1->input_pending when calculating
comparison value for c2.

src/imap-hibernate/imap-client.c

index 634cde11c233d64fcc6ba142211c64302e63e676..d1cfa043f5f060b6a8517c97747325a0d61eecd8 100644 (file)
@@ -608,7 +608,7 @@ static int client_unhibernate_cmp(const void *p1, const void *p2)
                 IMAP_CLIENT_MOVE_BACK_WITH_INPUT_TIMEOUT_SECS :
                 IMAP_CLIENT_MOVE_BACK_WITHOUT_INPUT_TIMEOUT_SECS);
        t2 = c2->move_back_start +
-               (c1->input_pending ?
+               (c2->input_pending ?
                 IMAP_CLIENT_MOVE_BACK_WITH_INPUT_TIMEOUT_SECS :
                 IMAP_CLIENT_MOVE_BACK_WITHOUT_INPUT_TIMEOUT_SECS);
        if (t1 < t2)