Mercurial > dovecot > core-2.2
changeset 12836:2cb0fb910441
expire: Fixed mail_debug logging when same transaction expunged all messages and saved new.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 07 Mar 2011 01:00:28 +0200 |
parents | 63ed0d3f4f52 |
children | 33cd03255c94 |
files | src/plugins/expire/expire-plugin.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/expire/expire-plugin.c Mon Mar 07 00:57:08 2011 +0200 +++ b/src/plugins/expire/expire-plugin.c Mon Mar 07 01:00:28 2011 +0200 @@ -128,6 +128,11 @@ if (xt->first_expunged) { /* first mail expunged. dict needs updating. */ first_nonexpunged_timestamp(t, &new_stamp); + if (new_stamp == 0 && xt->saves) { + /* everything was expunged, but also within this + transaction a new message was saved */ + new_stamp = ioloop_time; + } if (user->mail_debug) { i_debug("expire: Expunging first message in %s, " "updating timestamp to %ld", @@ -150,8 +155,7 @@ box->storage->user->username, "/", mailbox_get_vname(box), NULL); if (xt->first_expunged) { - if (new_stamp == 0 && xt->saves) - new_stamp = ioloop_time; + /* new_stamp is already set */ } else { i_assert(xt->saves); /* saved new mails. dict needs to be updated only if