CVS commit by ossi: 

sanitize S_DEL


  M +9 -4      sync.c   1.62


--- isync/src/sync.c  #1.61:1.62
@@ -666,4 +666,8 @@ sync_boxes( store_t *ctx[], const char *
                        del[M] = nom && (srec->uid[M] > 0);
                        del[S] = nos && (srec->uid[S] > 0);
+                       if (srec->msg[M] && (srec->msg[M]->flags & F_DELETED))
+                               srec->status |= S_DEL(M);
+                       if (srec->msg[S] && (srec->msg[S]->flags & F_DELETED))
+                               srec->status |= S_DEL(S);
                        nflags = srec->flags;
 
@@ -688,4 +692,5 @@ sync_boxes( store_t *ctx[], const char *
                                                default: /* ok */ break;
                                                case DRV_OK:
+                                                       srec->status |= 
S_DEL(t);
                                                        Fprintf( jfp, "%c %d %d 
0\n", "><"[t], srec->uid[M], srec->uid[S] );
                                                        srec->uid[1-t] = 0;
@@ -731,4 +736,8 @@ sync_boxes( store_t *ctx[], const char *
                                                default: /* ok */ break;
                                                case DRV_OK:
+                                                       if (aflags & F_DELETED)
+                                                               srec->status |= 
S_DEL(t);
+                                                       else if (dflags & 
F_DELETED)
+                                                               srec->status &= 
~S_DEL(t);
                                                        nflags = (nflags | 
aflags) & ~dflags;
                                                        if (unex) {
@@ -748,8 +757,4 @@ sync_boxes( store_t *ctx[], const char *
                                Fprintf( jfp, "* %d %d %u\n", srec->uid[M], 
srec->uid[S], nflags );
                        }
-                       if (srec->msg[M] && (srec->msg[M]->flags & F_DELETED))
-                               srec->status |= S_DEL(M);
-                       if (srec->msg[S] && (srec->msg[S]->flags & F_DELETED))
-                               srec->status |= S_DEL(S);
                }
        }




-------------------------------------------------------
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

Reply via email to