commit 4b0c5a0cd5e6e301ee5d633f90834826e413a2c5
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Tue Apr 12 12:18:09 2022 +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.

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

diff --git a/src/sync.c b/src/sync.c
index 15a44fd3..ee3af7e0 100644
--- 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;


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to