dovecot: Log an error if cache offset is tried to be updated wit...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 14 05:06:38 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/9f2e5701105f
changeset: 5738:9f2e5701105f
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 14 05:06:35 2007 +0300
description:
Log an error if cache offset is tried to be updated with itself.
diffstat:
1 file changed, 6 insertions(+)
src/lib-index/mail-cache-sync-update.c | 6 ++++++
diffs (16 lines):
diff -r 615a8c31ff47 -r 9f2e5701105f src/lib-index/mail-cache-sync-update.c
--- a/src/lib-index/mail-cache-sync-update.c Thu Jun 14 04:57:22 2007 +0300
+++ b/src/lib-index/mail-cache-sync-update.c Thu Jun 14 05:06:35 2007 +0300
@@ -140,6 +140,12 @@ int mail_cache_sync_handler(struct mail_
return 1;
}
+ if (*old_cache_offset == *new_cache_offset) {
+ mail_index_sync_set_corrupted(sync_ctx,
+ "Cache offset replaced with itself");
+ return -1;
+ }
+
if (mail_cache_link(cache, *old_cache_offset, *new_cache_offset) < 0)
return -1;
More information about the dovecot-cvs
mailing list