commit c7b05446d2a3316a4ab9bff349760f31c7ae456f
Author: Oswald Buddenhagen <[email protected]>
Date: Sun Nov 17 19:45:00 2019 +0100
add/fix comments
src/drv_imap.c | 1 +
src/mbsyncrc.sample | 2 +-
src/run-tests.pl | 1 +
src/sync.c | 12 +++++++-----
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index a4959fb..a0d4b01 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -2967,6 +2967,7 @@ imap_find_new_msgs_p2( imap_store_t *ctx, imap_cmd_t
*gcmd, int response )
return;
}
+ // We appended messages, so we need to re-query UIDNEXT.
ctx->uidnext = 0;
INIT_IMAP_CMD(imap_cmd_find_new_t, cmd, cmdp->callback,
cmdp->callback_aux)
diff --git a/src/mbsyncrc.sample b/src/mbsyncrc.sample
index ef842fe..abf74e5 100644
--- a/src/mbsyncrc.sample
+++ b/src/mbsyncrc.sample
@@ -21,7 +21,7 @@ Pass xxxxxxxx
#PassCmd "gpg --quiet --for-your-eyes-only --decrypt $HOME/imappassword.gpg"
# Fetch password from pwmd (http://pwmd.sourceforge.net/):
#PassCmd "echo -ne 'GET myIsp\\tpassword' | pwmc datafile"
-# On Mac OS X, run "KeyChain Access" -- File->New Password Item. Fill out form
using
+# On macOS, run "KeyChain Access" -- File->New Password Item. Fill out form
using
# "Keychain Item Name" http://IMAPSERVER (note: the "http://" is a hack)
# "Account Name" USERNAME
# "Password" PASSWORD
diff --git a/src/run-tests.pl b/src/run-tests.pl
index 539ad80..73a39a4 100755
--- a/src/run-tests.pl
+++ b/src/run-tests.pl
@@ -579,6 +579,7 @@ sub ckchan($$)
return $rslt;
}
+# $boxname, $maxuid, @msgs
sub printbox($$@)
{
my ($bn, $mu, @ms) = @_;
diff --git a/src/sync.c b/src/sync.c
index 7397db2..40512f2 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -712,7 +712,7 @@ load_state( sync_vars_t *svars )
}
if (ll == 1)
goto gothdr;
- if (line == 1 && isdigit( buf[0] )) {
+ if (line == 1 && isdigit( buf[0] )) { // Pre-1.1 legacy
if (sscanf( buf, "%63s %63s", buf1, buf2 ) != 2
||
sscanf( buf1, "%u:%u", &svars->uidval[M],
&svars->maxuid[M] ) < 2 ||
sscanf( buf2, "%u:%u:%u",
&svars->uidval[S], &smaxxuid, &svars->maxuid[S] ) < 3) {
@@ -1243,14 +1243,16 @@ box_opened2( sync_vars_t *svars, int t )
opts[1-t] |= OPEN_FLAGS;
}
if (chan->ops[t] & (OP_NEW|OP_RENEW)) {
+ // Note: OPEN_FLAGS on the source is not generally
required,
+ // as drv->fetch_msg() does that implicitly.
opts[t] |= OPEN_APPEND;
- if (chan->ops[t] & OP_RENEW)
+ if (chan->ops[t] & OP_RENEW) // Propagate previously
failed or too big msgs
opts[1-t] |= OPEN_OLD;
if (chan->ops[t] & OP_NEW)
opts[1-t] |= OPEN_NEW;
- if (chan->ops[t] & OP_EXPUNGE)
+ if (chan->ops[t] & OP_EXPUNGE) // Don't propagate
doomed msgs
opts[1-t] |= OPEN_FLAGS;
- if (chan->stores[t]->max_size != INT_MAX) {
+ if (chan->stores[t]->max_size != INT_MAX) { //
Propagate previously too big msgs
if (chan->ops[t] & OP_RENEW)
opts[1-t] |= OPEN_OLD_SIZE;
if (chan->ops[t] & OP_NEW)
@@ -1570,7 +1572,7 @@ box_loaded( int sts, message_t *msgs, int total_msgs, int
recent_msgs, void *aux
debug( "synchronizing new entries\n" );
for (t = 0; t < 2; t++) {
for (tmsg = svars->msgs[1-t]; tmsg; tmsg = tmsg->next) {
- // If new have no srec, the message is always New. If
we have a srec:
+ // If we have no srec, the message is always New. If we
have a srec:
// - message is paired or expired => ignore
// - message was skipped => ReNew
// - message was attempted, but is still pending or
failed => New
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel