[SVN] r477 - in /branches/cvsmerge/cyrus-cvs/imap: CVS/Entries mailbox.c

debian at incase.de debian at incase.de
Sun Jun 4 20:07:39 UTC 2006


Author: sven
Date: Sun Jun  4 22:07:37 2006
New Revision: 477

URL: https://mail.incase.de/viewcvs?rev=477&root=cyrus22&view=rev
Log:
Don't lock/unlock mailbox for reconstruct 

Modified:
    branches/cvsmerge/cyrus-cvs/imap/CVS/Entries
    branches/cvsmerge/cyrus-cvs/imap/mailbox.c

Modified: branches/cvsmerge/cyrus-cvs/imap/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/CVS/Entries?rev=477&root=cyrus22&r1=476&r2=477&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/CVS/Entries (original)
+++ branches/cvsmerge/cyrus-cvs/imap/CVS/Entries Sun Jun  4 22:07:37 2006
@@ -72,7 +72,6 @@
 /user.c/1.20/Tue Jun 22 16:59:17 2004//
 /user.h/1.6/Wed Oct 22 18:50:09 2003//
 /xversion.sh/1.7/Wed Oct 22 18:03:00 2003//
-/annotate.c/1.32/Thu Feb  9 23:49:53 2006//
 /append.c/1.108/Thu Feb  9 23:49:53 2006//
 /append.h/1.27/Thu Feb  9 23:49:53 2006//
 /arbitron.c/1.39/Thu Feb  9 23:49:53 2006//
@@ -112,7 +111,8 @@
 /imapd.c/1.500/Fri May 12 09:44:52 2006//
 /lmtp_sieve.c/1.12/Fri May 12 09:44:52 2006//
 /lmtpd.c/1.144/Fri May 12 09:44:52 2006//
-/mailbox.c/1.160/Fri May 12 09:44:52 2006//
 /mbdump.c/1.31/Fri May 12 09:44:52 2006//
 /mboxlist.c/1.242/Fri May 12 09:44:52 2006//
+/annotate.c/1.33/Sun Jun  4 20:05:44 2006//
+/mailbox.c/1.161/Sun Jun  4 20:05:45 2006//
 D

Modified: branches/cvsmerge/cyrus-cvs/imap/mailbox.c
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/mailbox.c?rev=477&root=cyrus22&r1=476&r2=477&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/mailbox.c (original)
+++ branches/cvsmerge/cyrus-cvs/imap/mailbox.c Sun Jun  4 22:07:37 2006
@@ -1,5 +1,5 @@
 /* mailbox.c -- Mailbox manipulation routines
- * $Id: mailbox.c,v 1.160 2006/05/10 16:27:18 murch Exp $
+ * $Id: mailbox.c,v 1.161 2006/06/02 18:56:52 murch Exp $
  * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1391,11 +1391,14 @@
 	return r;
     }
 
-    r = mailbox_lock_pop(mailbox);
-    if (r) {
-	mailbox_unlock_index(mailbox);
-	mailbox_unlock_header(mailbox);
-	return r;
+    if (!mailbox_doing_reconstruct) {
+	/* If we're reconstructing, we don't open the existing cache file */
+	r = mailbox_lock_pop(mailbox);
+	if (r) {
+	    mailbox_unlock_index(mailbox);
+	    mailbox_unlock_header(mailbox);
+	    return r;
+	}
     }
 
     strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
@@ -1499,7 +1502,7 @@
 	goto fail;
     }
 
-    mailbox_unlock_pop(mailbox);
+    if (!mailbox_doing_reconstruct) mailbox_unlock_pop(mailbox);
     mailbox_unlock_index(mailbox);
     mailbox_unlock_header(mailbox);
     fclose(newindex);
@@ -1507,7 +1510,7 @@
     return 0;
 
  fail:
-    mailbox_unlock_pop(mailbox);
+    if (!mailbox_doing_reconstruct) mailbox_unlock_pop(mailbox);
     mailbox_unlock_index(mailbox);
     mailbox_unlock_header(mailbox);
 



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list