changeset 5180:8e8b1ad19ad1 HEAD

If uidlist locking fails because of a timeout, given timeout error message to user instead of internal error.
author Timo Sirainen <tss@iki.fi>
date Thu, 22 Feb 2007 15:39:15 +0200
parents 2f9ac504ee77
children 922672fcdfdc
files src/lib-storage/index/dbox/dbox-uidlist.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-uidlist.c	Thu Feb 22 15:37:29 2007 +0200
+++ b/src/lib-storage/index/dbox/dbox-uidlist.c	Thu Feb 22 15:39:15 2007 +0200
@@ -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;