commit e6a15bee596eda747a016c9c52b27761c1632350
Author: Oswald Buddenhagen <[email protected]>
Date: Sun Feb 20 12:39:19 2022 +0100
make sure we fetch source flags when expiring while pulling new
otherwise important messages may be incorrectly aborted.
src/run-tests.pl | 7 ++++---
src/sync.c | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/run-tests.pl b/src/run-tests.pl
index 18c3cac1..7d00f8de 100755
--- a/src/run-tests.pl
+++ b/src/run-tests.pl
@@ -1251,20 +1251,21 @@ my @x35 = (
A, "*F", "*F", "*F",
B, "*", "*", "*",
C, "*", "", "",
- D, "*", "", "",
+ D, "*F", "", "",
E, "*", "", "",
F, "*", "", "",
G, "*", "", "",
- H, "*", "", "",
+ H, "*F", "", "",
);
my @O35 = ("", "", "Sync New\nMaxMessages 3\nExpireUnread yes\n");
my @X35 = (
H, E, H,
B, "", "+~", "+T",
+ D, "", "*F", "*F",
F, "", "*", "*",
G, "", "*", "*",
- H, "", "*", "*",
+ H, "", "*F", "*F",
);
test("max messages + expire - too many new", \@x35, \@X35, \@O35);
diff --git a/src/sync.c b/src/sync.c
index 2625c74f..b84efc02 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -792,6 +792,8 @@ box_opened2( sync_vars_t *svars, int t )
svars->any_expiring = 1;
if (svars->any_expiring) {
opts[N] |= OPEN_OLD | OPEN_FLAGS;
+ if (chan->ops[N] & (OP_NEW | OP_RENEW))
+ opts[F] |= OPEN_FLAGS;
}
svars->opts[F] = svars->drv[F]->prepare_load_box( ctx[F], opts[F] );
svars->opts[N] = svars->drv[N]->prepare_load_box( ctx[N], opts[N] );
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel