[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-lock.c, 1.17, 1.18

cras at dovecot.org cras at dovecot.org
Sun Sep 18 19:43:47 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv7619

Modified Files:
	mbox-lock.c 
Log Message:
Don't hide error message if fcntl() fails with EAGAIN/EACCES



Index: mbox-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-lock.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mbox-lock.c	22 Jul 2005 10:22:18 -0000	1.17
+++ mbox-lock.c	18 Sep 2005 16:43:45 -0000	1.18
@@ -390,8 +390,7 @@
 
 	while (fcntl(ctx->mbox->mbox_fd, wait_type, &fl) < 0) {
 		if (errno != EINTR) {
-			if (errno != EAGAIN && errno != EACCES)
-				mbox_set_syscall_error(ctx->mbox, "fcntl()");
+			mbox_set_syscall_error(ctx->mbox, "fcntl()");
 			alarm(0);
 			return -1;
 		}
@@ -460,7 +459,7 @@
 		/* read-only mbox stream. no need to lock. */
 		i_assert(mbox->mbox_readonly);
 		mbox->mbox_lock_type = lock_type;
-		return TRUE;
+		return 1;
 	}
 
 	max_wait_time = time(NULL) + lock_timeout;



More information about the dovecot-cvs mailing list