commit f06b6bb3227fe840b1609dbe3307c3bfc958346d
Author: Oswald Buddenhagen <[email protected]>
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 880ecfd..9b8a025 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -179,7 +179,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)
@@ -395,7 +396,9 @@ cancel_sync( sync_vars_t *svars )
if (svars->ret & SYNC_BAD(t)) {
svars->drv[t]->cancel_store( svars->ctx[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
);
}
}
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel