CVS commit by ossi:
don't enter trash loop if not trashing at all. also, move expunge
message where it belongs. not adding info("trashing"), as it will be
replaced in a moment anyway.
M +6 -4 sync.c 1.81
--- isync/src/sync.c #1.80:1.81
@@ -1073,7 +1073,7 @@ sync_boxes( store_t *ctx[], const char *
for (t = 0; t < 2; t++) {
- if (svars->chan->ops[t] & OP_EXPUNGE) {
- info( "Expunging %s\n", str_ms[t] );
- debug( "expunging %s\n", str_ms[t] );
+ if ((svars->chan->ops[t] & OP_EXPUNGE) &&
+ (svars->ctx[t]->conf->trash ||
(svars->ctx[1-t]->conf->trash && svars->ctx[1-t]->conf->trash_remote_new))) {
+ debug( "trashing in %s\n", str_ms[t] );
for (tmsg = svars->ctx[t]->msgs; tmsg; tmsg =
tmsg->next)
if (tmsg->flags & F_DELETED) {
@@ -1088,5 +1088,5 @@ sync_boxes( store_t *ctx[], const char *
} else
debug( " not trashing
message %d - not new\n", tmsg->uid );
- } else if (svars->ctx[1-t]->conf->trash
&& svars->ctx[1-t]->conf->trash_remote_new) {
+ } else {
if (!tmsg->srec ||
tmsg->srec->uid[1-t] < 0) {
if
(!svars->ctx[1-t]->conf->max_size || tmsg->size <=
svars->ctx[1-t]->conf->max_size) {
@@ -1105,4 +1105,6 @@ sync_boxes( store_t *ctx[], const char *
}
+ info( "Expunging %s...\n", str_ms[t] );
+ debug( "expunging %s\n", str_ms[t] );
switch (svars->drv[t]->close( svars->ctx[t] )) {
case DRV_OK: svars->state[t] |= ST_DID_EXPUNGE; break;
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel