commit 0aa4c628dff895d4829f8d659297885fd2eb90dd
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Thu Mar 30 19:39:14 2017 +0200

    add comments

 src/drv_imap.c   | 13 +++++++++++++
 src/run-tests.pl |  4 ++++
 2 files changed, 17 insertions(+)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index fb0a0ae..80c97c9 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -2712,6 +2712,7 @@ imap_find_new_msgs( store_t *gctx, int newuid,
 
        INIT_IMAP_CMD_X(imap_cmd_find_new_t, cmd, cb, aux)
        cmd->uid = newuid;
+       // Some servers fail to enumerate recently STOREd messages without 
syncing first.
        imap_exec( (imap_store_t *)ctx, &cmd->gen.gen, imap_find_new_msgs_p2, 
"CHECK" );
 }
 
@@ -2739,6 +2740,18 @@ imap_list_store( store_t *gctx, int flags,
        imap_store_t *ctx = (imap_store_t *)gctx;
        imap_cmd_refcounted_state_t *sts = imap_refcounted_new_state( cb, aux );
 
+       // ctx->prefix may be empty, "INBOX.", or something else.
+       // 'flags' may be LIST_INBOX, LIST_PATH (or LIST_PATH_MAYBE), or both.
+       // This matrix determines what to query, and what comes out as a side 
effect:
+       //
+       // qry \ pfx | empty | inbox | other
+       // ----------+-------+-------+-------
+       // inbox     | i     | i [p] | i
+       // both      | p [i] | i [p] | i + p
+       // path      | p [i] | p {i} | p
+       //
+       // {i} => This doesn't actually contain INBOX itself, only its 
subfolders.
+       //
        if ((flags & (LIST_PATH | LIST_PATH_MAYBE)) && (!(flags & LIST_INBOX) 
|| !is_inbox( ctx, ctx->prefix, -1 )))
                imap_exec( ctx, imap_refcounted_new_cmd( sts ), 
imap_refcounted_done_box,
                           "LIST \"\" \"%\\s*\"", ctx->prefix );
diff --git a/src/run-tests.pl b/src/run-tests.pl
index 6783db7..8ecc9f2 100755
--- a/src/run-tests.pl
+++ b/src/run-tests.pl
@@ -32,6 +32,10 @@ sub test($$$@);
 
 
################################################################################
 
+# Format of the test defs: [ master, slave, state ]
+# master/slave: [ maxuid, { seq, uid, flags }... ]
+# state: [ MaxPulledUid, MaxExpiredMasterUid, MaxPushedUid, { muid, suid, 
flags }... ]
+
 # generic syncing tests
 my @x01 = (
  [ 8,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to