CVS commit by ossi: 

move driver options composition below journal replay - it might make
additional actions necessary (it doesn't, yet).


  M +36 -35    sync.c   1.53


--- isync/src/sync.c  #1.52:1.53
@@ -197,38 +197,4 @@ sync_boxes( store_t *ctx[], const char *
        recs = 0, srecadd = &recs;
 
-       opts[M] = opts[S] = 0;
-       for (t = 0; t < 2; t++) {
-               if (chan->ops[t] & (OP_DELETE|OP_FLAGS)) {
-                       opts[t] |= OPEN_SETFLAGS;
-                       opts[1-t] |= OPEN_OLD;
-                       if (chan->ops[t] & OP_FLAGS)
-                               opts[1-t] |= OPEN_FLAGS;
-               }
-               if (chan->ops[t] & (OP_NEW|OP_RENEW)) {
-                       opts[t] |= OPEN_APPEND;
-                       if (chan->ops[t] & OP_RENEW)
-                               opts[1-t] |= OPEN_OLD;
-                       if (chan->ops[t] & OP_NEW)
-                               opts[1-t] |= OPEN_NEW;
-                       if (chan->ops[t] & OP_EXPUNGE)
-                               opts[1-t] |= OPEN_FLAGS;
-                       if (chan->stores[t]->max_size)
-                               opts[1-t] |= OPEN_SIZE;
-               }
-               if (chan->ops[t] & OP_EXPUNGE) {
-                       opts[t] |= OPEN_EXPUNGE;
-                       if (chan->stores[t]->trash) {
-                               if (!chan->stores[t]->trash_only_new)
-                                       opts[t] |= OPEN_OLD;
-                               opts[t] |= OPEN_NEW|OPEN_FLAGS;
-                       } else if (chan->stores[1-t]->trash && 
chan->stores[1-t]->trash_remote_new)
-                               opts[t] |= OPEN_NEW|OPEN_FLAGS;
-               }
-               if (chan->ops[t] & OP_CREATE)
-                       opts[t] |= OPEN_CREATE;
-       }
-       if ((chan->ops[S] & (OP_NEW|OP_RENEW)) && chan->max_messages)
-               opts[S] |= OPEN_OLD|OPEN_NEW|OPEN_FLAGS;
-
        for (t = 0; t < 2; t++) {
                ctx[t]->name =
@@ -238,5 +204,4 @@ sync_boxes( store_t *ctx[], const char *
                driver[t] = ctx[t]->conf->driver;
                driver[t]->prepare_paths( ctx[t] );
-               driver[t]->prepare_opts( ctx[t], opts[t] );
        }
 
@@ -441,4 +406,40 @@ sync_boxes( store_t *ctx[], const char *
   skiprd:
 
+       opts[M] = opts[S] = 0;
+       for (t = 0; t < 2; t++) {
+               if (chan->ops[t] & (OP_DELETE|OP_FLAGS)) {
+                       opts[t] |= OPEN_SETFLAGS;
+                       opts[1-t] |= OPEN_OLD;
+                       if (chan->ops[t] & OP_FLAGS)
+                               opts[1-t] |= OPEN_FLAGS;
+               }
+               if (chan->ops[t] & (OP_NEW|OP_RENEW)) {
+                       opts[t] |= OPEN_APPEND;
+                       if (chan->ops[t] & OP_RENEW)
+                               opts[1-t] |= OPEN_OLD;
+                       if (chan->ops[t] & OP_NEW)
+                               opts[1-t] |= OPEN_NEW;
+                       if (chan->ops[t] & OP_EXPUNGE)
+                               opts[1-t] |= OPEN_FLAGS;
+                       if (chan->stores[t]->max_size)
+                               opts[1-t] |= OPEN_SIZE;
+               }
+               if (chan->ops[t] & OP_EXPUNGE) {
+                       opts[t] |= OPEN_EXPUNGE;
+                       if (chan->stores[t]->trash) {
+                               if (!chan->stores[t]->trash_only_new)
+                                       opts[t] |= OPEN_OLD;
+                               opts[t] |= OPEN_NEW|OPEN_FLAGS;
+                       } else if (chan->stores[1-t]->trash && 
chan->stores[1-t]->trash_remote_new)
+                               opts[t] |= OPEN_NEW|OPEN_FLAGS;
+               }
+               if (chan->ops[t] & OP_CREATE)
+                       opts[t] |= OPEN_CREATE;
+       }
+       if ((chan->ops[S] & (OP_NEW|OP_RENEW)) && chan->max_messages)
+               opts[S] |= OPEN_OLD|OPEN_NEW|OPEN_FLAGS;
+       driver[M]->prepare_opts( ctx[M], opts[M] );
+       driver[S]->prepare_opts( ctx[S], opts[S] );
+
        if (ctx[S]->opts & OPEN_NEW)
                maxwuid = INT_MAX;




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