[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-uidlist.c, 1.28.2.13, 1.28.2.14

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


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

Modified Files:
      Tag: branch_1_0
	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.28.2.13
retrieving revision 1.28.2.14
diff -u -d -r1.28.2.13 -r1.28.2.14
--- dbox-uidlist.c	22 Feb 2007 12:50:08 -0000	1.28.2.13
+++ dbox-uidlist.c	22 Feb 2007 13:39:12 -0000	1.28.2.14
@@ -442,6 +442,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