# HG changeset patch # User Timo Sirainen # Date 1181786795 -10800 # Node ID 9f2e5701105f7a8aaf73bb88292f46d8e27a2b73 # Parent 615a8c31ff47203e7c930ec85effc5e0b2cee62a Log an error if cache offset is tried to be updated with itself. 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 @@ 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;