isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 4b0c5a0cd5e6e301ee5d633f90834826e413a2c5
parent d92c62022ab0ef7dfcdf144ef5525d38858c9806
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Tue, 12 Apr 2022 12:18:09 +0200

do not exclude oversized messages from remote trashing

... as otherwise these messages would be just lost.

the assumption is that opposite-side trashing is used only for locally
generated messages whose size we control. it's also more consistent with
same-side trashing, where even oversized messages would be trashed.

the exclusion was broken anyway, as we failed to query the size of old
messages, particularly after 70bad661.

Diffstat:
Msrc/sync.c | 19++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/sync.c b/src/sync.c @@ -1579,27 +1579,16 @@ msgs_flags_set( sync_vars_t *svars, int t ) debug( "was already trashed\n" ); continue; } + debug( "- trashing\n" ); + trash_total[t]++; + stats(); + svars->trash_pending[t]++; if (!remote) { - debug( "- trashing\n" ); - trash_total[t]++; - stats(); - svars->trash_pending[t]++; tv = nfmalloc( sizeof(*tv) ); tv->aux = AUX; tv->msg = tmsg; svars->drv[t]->trash_msg( svars->ctx[t], tmsg, msg_trashed, tv ); } else { - if (tmsg->size > svars->ctx[t^1]->conf->max_size) { - // This is questionable, as these messages are actually lost - // (no upgradable dummies here). - // However, this is an unlikely configuration to start with ... - debug( "is too big\n" ); - continue; - } - debug( "- trashing\n" ); - trash_total[t]++; - stats(); - svars->trash_pending[t]++; cv = nfmalloc( sizeof(*cv) ); cv->cb = msg_rtrashed; cv->aux = INV_AUX;