[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-uidlist.c, 1.44, 1.45

tss at dovecot.org tss at dovecot.org
Thu Feb 22 13:39:18 UTC 2007


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

Modified Files:
	dbox-uidlist.c 
Log Message:
If uidlist locking fails because of a timeout, given timeout error message
to user instead of internal error.



Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- dbox-uidlist.c	22 Feb 2007 12:50:14 -0000	1.44
+++ dbox-uidlist.c	22 Feb 2007 13:39:15 -0000	1.45
@@ -439,6 +439,12 @@
 		file_dotlock_open(&mbox->storage->uidlist_dotlock_set,
 				  uidlist->path, 0, &uidlist->dotlock);
 	if (uidlist->lock_fd == -1) {
+		if (errno == EAGAIN) {
+			mail_storage_set_error(STORAGE(mbox->storage),
+				"Timeout while waiting for lock");
+			STORAGE(mbox->storage)->temporary_error = TRUE;
+			return 0;
+		}
 		mail_storage_set_critical(STORAGE(mbox->storage),
 			"file_dotlock_open(%s) failed: %m", uidlist->path);
 		return -1;



More information about the dovecot-cvs mailing list