CVS commit by ossi: orphan/kill all affected entries after expunge
M +1 -1 run-tests.pl 1.15 M +10 -11 sync.c 1.64 --- isync/src/run-tests.pl #1.14:1.15 @@ -54,5 +54,5 @@ 1, 1, "F", 2, 2, "F", 3, 3, "FS", 4, 4, "", 9, 10, "", 10, 9, "" ], [ 9, 0, 9, - 1, 1, "F", 2, 2, "F", 3, 3, "FS", 4, 4, "", 5, 5, "T", 6, 0, "", 7, 7, "T", 10, 9, "", 9, 10, "" ], + 1, 1, "F", 2, 2, "F", 3, 3, "FS", 4, 4, "", 5, 0, "T", 6, 0, "", 7, 0, "T", 10, 9, "", 9, 10, "" ], ); test([EMAIL PROTECTED], [EMAIL PROTECTED]); --- isync/src/sync.c #1.63:1.64 @@ -874,19 +874,18 @@ sync_boxes( store_t *ctx[], const char * continue; if (srec->uid[S] <= 0 || ((srec->status & S_DEL(S)) && ex[S])) { - if (srec->uid[M] <= 0 || ((srec->status & S_DEL(M)) && ex[M])) { - debug( " -> killing (%d,%d)\n", srec->uid[M], srec->uid[S] ); - srec->status = S_DEAD; - Fprintf( jfp, "- %d %d\n", srec->uid[M], srec->uid[S] ); - } else if (srec->status & S_EXPIRED) { - if (maxuid[M] >= srec->uid[M] && minwuid > srec->uid[M]) { + if (srec->uid[M] <= 0 || ((srec->status & S_DEL(M)) && ex[M]) || + ((srec->status & S_EXPIRED) && maxuid[M] >= srec->uid[M] && minwuid > srec->uid[M])) { debug( " -> killing (%d,%d)\n", srec->uid[M], srec->uid[S] ); srec->status = S_DEAD; Fprintf( jfp, "- %d %d\n", srec->uid[M], srec->uid[S] ); - } else if (srec->uid[S]) { + } else if (srec->uid[S] > 0) { debug( " -> orphaning (%d,[%d])\n", srec->uid[M], srec->uid[S] ); Fprintf( jfp, "> %d %d 0\n", srec->uid[M], srec->uid[S] ); srec->uid[S] = 0; } - } + } else if (srec->uid[M] > 0 && ((srec->status & S_DEL(M)) && ex[M])) { + debug( " -> orphaning ([%d],%d)\n", srec->uid[M], srec->uid[S] ); + Fprintf( jfp, "< %d %d 0\n", srec->uid[M], srec->uid[S] ); + srec->uid[M] = 0; } } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel