[dovecot-cvs] dovecot/src/lib-storage/subscription-file subscription-file.c,1.8,1.9
cras at procontrol.fi
cras at procontrol.fi
Mon Nov 25 21:02:52 EET 2002
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c,1.24,1.25 mbox-storage.c,1.18,1.19
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index index-copy.c,1.21,1.22 index-expunge.c,1.12,1.13 index-fetch.c,1.33,1.34 index-messageset.c,1.7,1.8 index-search.c,1.42,1.43 index-status.c,1.19,1.20 index-storage.c,1.20,1.21 index-storage.h,1.22,1.23 Message-Id: <20021125190252.7E63E23997@danu.procontrol.fi>
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-storage/subscription-file
In directory danu:/tmp/cvs-serv2991/src/lib-storage/subscription-file
Modified Files:
subscription-file.c
Log Message:
Locking changes triggered a bit larger cleanup :) If we have to wait for a
lock longer, the client is now notified about it every 30 seconds. Also if
mailbox opening fails because of lock timeout, we won't overwrite the index
anymore. Finally user gets a clear error message about lock timeout instead
of "internal error".
Index: subscription-file.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/subscription-file/subscription-file.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- subscription-file.c 23 Oct 2002 20:41:35 -0000 1.8
+++ subscription-file.c 25 Nov 2002 19:02:50 -0000 1.9
@@ -42,8 +42,9 @@
return -1;
}
- if (file_wait_lock(fd, update ? F_WRLCK : F_RDLCK,
- DEFAULT_LOCK_TIMEOUT) <= 0) {
+ /* FIXME: we should work without locking, rename() would be easiest
+ but .lock would work too */
+ if (file_wait_lock(fd, update ? F_WRLCK : F_RDLCK) <= 0) {
subsfile_set_syscall_error(storage, "file_wait_lock()", *path);
(void)close(fd);
return -1;
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c,1.24,1.25 mbox-storage.c,1.18,1.19
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index index-copy.c,1.21,1.22 index-expunge.c,1.12,1.13 index-fetch.c,1.33,1.34 index-messageset.c,1.7,1.8 index-search.c,1.42,1.43 index-status.c,1.19,1.20 index-storage.c,1.20,1.21 index-storage.h,1.22,1.23 Message-Id: <20021125190252.7E63E23997@danu.procontrol.fi>
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list