CVS commit by ossi: 

less cluttered debug output


  M +11 -6     sync.c   1.68


--- isync/src/sync.c  #1.67:1.68
@@ -695,9 +695,8 @@ sync_boxes( store_t *ctx[], const char *
                                } else if (del[1-t]) {
                                        /* c.4) d.9) / b.4) d.4) */
-                                       debug( "  %s vanished\n", str_ms[1-t] );
                                        if (srec->msg[t] && srec->msg[t]->flags 
!= nflags)
                                                info( "Info: conflicting 
changes in (%d,%d)\n", srec->uid[M], srec->uid[S] );
                                        if (chan->ops[t] & OP_DELETE) {
-                                               debug( "  -> %s delete\n", 
str_hl[t] );
+                                               debug( "  %sing delete\n", 
str_hl[t] );
                                                switch (driver[t]->set_flags( 
ctx[t], srec->msg[t], srec->uid[t], F_DELETED, 0 )) {
                                                case DRV_STORE_BAD: ret = 
SYNC_BAD(t); goto finish;
@@ -709,5 +708,6 @@ sync_boxes( store_t *ctx[], const char *
                                                        srec->uid[1-t] = 0;
                                                }
-                                       }
+                                       } else
+                                               debug( "  not %sing delete\n", 
str_hl[t] );
                                } else if (!srec->msg[1-t])
                                        /* c.1) c.2) d.7) d.8) / b.1) b.2) d.2) 
d.3) */
@@ -718,7 +718,5 @@ sync_boxes( store_t *ctx[], const char *
                                else if (!del[t]) {
                                        /* a) & b.3) / c.3) */
-                                       debug( "  may %s\n", str_hl[t] );
                                        if (chan->ops[t] & OP_FLAGS) {
-                                               debug( "  -> %sing flags\n", 
str_hl[t] );
                                                sflags = srec->msg[1-t]->flags;
                                                aflags = sflags & ~nflags;
@@ -744,4 +742,10 @@ sync_boxes( store_t *ctx[], const char *
                                                        dflags = 0;
                                                }
+                                               if (DFlags & DEBUG) {
+                                                       char afbuf[16], 
dfbuf[16]; /* enlarge when support for keywords is added */
+                                                       make_flags( aflags, 
afbuf );
+                                                       make_flags( dflags, 
dfbuf );
+                                                       debug( "  %sing flags: 
+%s -%s\n", str_hl[t], afbuf, dfbuf );
+                                               }
                                                switch ((aflags | dflags) ? 
driver[t]->set_flags( ctx[t], srec->msg[t], srec->uid[t], aflags, dflags ) : 
DRV_OK) {
                                                case DRV_STORE_BAD: ret = 
SYNC_BAD(t); goto finish;
@@ -761,5 +765,6 @@ sync_boxes( store_t *ctx[], const char *
                                                        }
                                                }
-                                       }
+                                       } else
+                                               debug( "  not %sing flags\n", 
str_hl[t] );
                                } /* else b.4) / c.4) */
                        }




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