dovecot-2.0-sslstream: expire-tool: Check and log an error if di...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 13 03:00:21 EET 2010
details: http://hg.dovecot.org/dovecot-2.0-sslstream/rev/568c437ad951
changeset: 10629:568c437ad951
user: Timo Sirainen <tss at iki.fi>
date: Tue Feb 02 15:20:04 2010 +0200
description:
expire-tool: Check and log an error if dict iteration fails.
diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
src/plugins/expire/expire-tool.c | 5 ++++-
diffs (29 lines):
diff -r 5e50d5597474 -r 568c437ad951 src/plugins/expire/expire-tool.c
--- a/src/plugins/expire/expire-tool.c Tue Feb 02 15:18:25 2010 +0200
+++ b/src/plugins/expire/expire-tool.c Tue Feb 02 15:20:04 2010 +0200
@@ -230,7 +230,7 @@ static void expire_run(struct master_ser
DICT_ITERATE_FLAG_SORT_BY_VALUE);
/* We'll get the oldest values (timestamps) first */
- while (dict_iterate(iter, &key, &value) > 0) {
+ while ((ret = dict_iterate(iter, &key, &value)) > 0) {
/* key = DICT_EXPIRE_PREFIX<user>/<mailbox> */
userp = key + strlen(DICT_EXPIRE_PREFIX);
@@ -263,6 +263,7 @@ static void expire_run(struct master_ser
if (ret < 0) {
/* failed to update */
+ ret = 0;
} else if (next_expire == 0) {
/* no more messages or mailbox deleted */
if (!testrun)
@@ -287,6 +288,8 @@ static void expire_run(struct master_ser
} T_END;
}
}
+ if (ret < 0)
+ i_error("Dictionary iteration failed");
if (testrun && userp == NULL)
i_info("No entries in dictionary");
More information about the dovecot-cvs
mailing list