isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 8bd6eb433f895418a073b021d40bf5d64bd2463c
parent 9a0403f446318803ed239ba804334b4aee4f21ad
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sun,  6 Sep 2015 22:56:38 +0200

don't attempt to issue LOGOUT on bad stores

amends 9d22641b.

Diffstat:
Msrc/drv_imap.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c @@ -1501,8 +1501,12 @@ imap_cleanup( void ) for (ctx = unowned; ctx; ctx = nctx) { nctx = ctx->next; set_bad_callback( ctx, (void (*)(void *))imap_cancel_store, ctx ); - ((imap_store_t *)ctx)->expectBYE = 1; - imap_exec( (imap_store_t *)ctx, 0, imap_cleanup_p2, "LOGOUT" ); + if (((imap_store_t *)ctx)->state != SST_BAD) { + ((imap_store_t *)ctx)->expectBYE = 1; + imap_exec( (imap_store_t *)ctx, 0, imap_cleanup_p2, "LOGOUT" ); + } else { + imap_cancel_store( ctx ); + } } }