commit e4fb0f457faceb75fd7f3f4210f28ffdd5634850 Author: Oswald Buddenhagen <o...@kde.org> Date: Sun Apr 3 16:29:18 2011 +0200
don't call cancel() repeatedly on a store erroring command replies will trickle in even after canceling src/sync.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sync.c b/src/sync.c index dd0a662..5fda78a 100644 --- a/src/sync.c +++ b/src/sync.c @@ -185,7 +185,8 @@ typedef struct { #define ST_SENT_FLAGS (1<<3) #define ST_SENT_TRASH (1<<4) #define ST_CLOSED (1<<5) -#define ST_CANCELED (1<<6) +#define ST_SENT_CANCEL (1<<6) +#define ST_CANCELED (1<<7) #define ST_DID_EXPUNGE (1<<16) @@ -399,7 +400,9 @@ cancel_sync( sync_vars_t *svars ) int other_state = svars->state[1-t]; if (svars->ret & SYNC_BAD(t)) { cancel_done( AUX ); - } else { + } else if (!(svars->state[t] & ST_SENT_CANCEL)) { + /* ignore subsequent failures from in-flight commands */ + svars->state[t] |= ST_SENT_CANCEL; svars->drv[t]->cancel( svars->ctx[t], cancel_done, AUX ); } if (other_state & ST_CANCELED) ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel