dovecot-2.0: mdbox: Copying wasn't locking map index early enough.
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Mon Jul 19 15:06:12 EEST 2010
    
    
  
details:   http://hg.dovecot.org/dovecot-2.0/rev/1e0916e4700c
changeset: 11853:1e0916e4700c
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 19 13:02:24 2010 +0100
description:
mdbox: Copying wasn't locking map index early enough.
diffstat:
 src/lib-storage/index/dbox-multi/mdbox-save.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r bb2c6be5be5c -r 1e0916e4700c src/lib-storage/index/dbox-multi/mdbox-save.c
--- a/src/lib-storage/index/dbox-multi/mdbox-save.c	Mon Jul 19 13:01:40 2010 +0100
+++ b/src/lib-storage/index/dbox-multi/mdbox-save.c	Mon Jul 19 13:02:24 2010 +0100
@@ -286,6 +286,10 @@
 
 	i_assert(ctx->ctx.finished);
 
+	/* make sure the map gets locked */
+	if (mdbox_map_atomic_lock(ctx->atomic) < 0)
+		return -1;
+
 	/* assign map UIDs for newly saved messages. they're written to
 	   transaction log immediately within this function, but the map
 	   is left locked. */
    
    
More information about the dovecot-cvs
mailing list