diff src/lib-index/mail-cache-private.h @ 17902:8c84b69e7f69

lib-index: mail_cache_lock() partial rewrite. require_same_reset_id is no longer needed, if it ever was. If we're locking the cache file, we always want the latest one. The logic of locking in general was somewhat confusing and it probably didn't always successfully lock when it should have, because the reset_id happened to match an old file.
author Timo Sirainen <tss@iki.fi>
date Tue, 07 Oct 2014 18:47:09 +0300
parents d6e08d98a170
children 34074cc72a15
line wrap: on
line diff
--- a/src/lib-index/mail-cache-private.h	Tue Oct 07 02:54:35 2014 +0300
+++ b/src/lib-index/mail-cache-private.h	Tue Oct 07 18:47:09 2014 +0300
@@ -212,7 +212,7 @@
 
 /* Explicitly lock the cache file. Returns -1 if error / timed out,
    1 if ok, 0 if cache is broken/doesn't exist */
-int mail_cache_lock(struct mail_cache *cache, bool require_same_reset_id);
+int mail_cache_lock(struct mail_cache *cache);
 int mail_cache_try_lock(struct mail_cache *cache);
 /* Returns -1 if cache is / just got corrupted, 0 if ok. */
 int mail_cache_unlock(struct mail_cache *cache);