commit 3de60c8f5cb048dd926ce25a4123b4660fb02f34
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Fri May 1 20:19:58 2015 +0200

    make flags in pattern debugging non-cumulative

 src/main.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index 23b6931..24a6639 100644
--- a/src/main.c
+++ b/src/main.c
@@ -900,7 +900,7 @@ store_opened( store_t *ctx, void *aux )
 {
        MVARS(aux)
        string_list_t *cpat;
-       int flags;
+       int cflags;
 
        if (!ctx) {
                mvars->ret = mvars->skip = 1;
@@ -910,11 +910,12 @@ store_opened( store_t *ctx, void *aux )
        }
        mvars->ctx[t] = ctx;
        if (!mvars->skip && !mvars->chanptr->boxlist && mvars->chan->patterns 
&& !ctx->listed) {
-               for (flags = 0, cpat = mvars->chan->patterns; cpat; cpat = 
cpat->next) {
+               for (cflags = 0, cpat = mvars->chan->patterns; cpat; cpat = 
cpat->next) {
                        const char *pat = cpat->string;
                        if (*pat != '!') {
                                char buf[8];
                                int bufl = snprintf( buf, sizeof(buf), "%s%s", 
nz( mvars->chan->boxes[t], "" ), pat );
+                               int flags = 0;
                                /* Partial matches like "INB*" or even "*" are 
not considered,
                                 * except implicity when the INBOX lives under 
Path. */
                                if (starts_with( buf, bufl, "INBOX", 5 )) {
@@ -941,10 +942,11 @@ store_opened( store_t *ctx, void *aux )
                                }
                                debug( "pattern '%s' (effective '%s'): %sPath, 
%sINBOX\n",
                                       pat, buf, (flags & LIST_PATH) ? "" : "no 
",  (flags & LIST_INBOX) ? "" : "no ");
+                               cflags |= flags;
                        }
                }
                set_bad_callback( ctx, store_bad, AUX );
-               mvars->drv[t]->list_store( ctx, flags, store_listed, AUX );
+               mvars->drv[t]->list_store( ctx, cflags, store_listed, AUX );
        } else {
                mvars->state[t] = ST_OPEN;
                sync_chans( mvars, E_OPEN );

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to