dovecot-1.1: expire-tool --test: Log timestamps also in user-rea...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 29 17:40:29 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/321e0e3d352e
changeset: 7975:321e0e3d352e
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 29 17:39:25 2008 +0200
description:
expire-tool --test: Log timestamps also in user-readable format.
diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
src/plugins/expire/expire-tool.c | 12 +++++++-----
diffs (40 lines):
diff -r 7223a25178db -r 321e0e3d352e src/plugins/expire/expire-tool.c
--- a/src/plugins/expire/expire-tool.c Sun Oct 26 16:31:36 2008 +0200
+++ b/src/plugins/expire/expire-tool.c Wed Oct 29 17:39:25 2008 +0200
@@ -180,7 +180,7 @@ static void expire_run(bool testrun)
struct dict_transaction_context *trans;
struct dict_iterate_context *iter;
struct expire_env *env;
- time_t oldest;
+ time_t oldest, expire_time;
unsigned int expunge_secs, altmove_secs;
const char *auth_socket, *p, *key, *value;
const char *userp, *mailbox;
@@ -238,12 +238,13 @@ static void expire_run(bool testrun)
}
continue;
}
- if (time(NULL) < (time_t)strtoul(value, NULL, 10)) {
+ expire_time = strtoul(value, NULL, 10);
+ if (time(NULL) < expire_time) {
/* this and the rest of the timestamps are in future,
so stop processing */
if (testrun) {
i_info("%s: stop, expire time in future: %s",
- userp, value);
+ userp, ctime(&expire_time));
}
break;
}
@@ -277,8 +278,9 @@ static void expire_run(bool testrun)
} else if (!testrun)
dict_set(trans, key, new_value);
else {
- i_info("%s: timestamp %s -> %s",
- userp, value, new_value);
+ i_info("%s: timestamp %s (%s) -> %s (%s)",
+ userp, value, ctime(&expire_time),
+ new_value, ctime(&oldest));
}
}
}
More information about the dovecot-cvs
mailing list