[dovecot-cvs] dovecot/src/lib-storage/subscription-file
subscription-file.c, 1.31, 1.32
cras at dovecot.org
cras at dovecot.org
Sun Feb 26 12:15:44 EET 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/subscription-file
In directory talvi:/tmp/cvs-serv9314/lib-storage/subscription-file
Modified Files:
subscription-file.c
Log Message:
Renamed safe-open.* to nfs-workarounds.*, safe_open() to nfs_safe_open() and
added a new global NFS_ESTALE_RETRY_COUNT which everyone uses instead of
defining their own.
Index: subscription-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/subscription-file/subscription-file.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- subscription-file.c 26 Feb 2006 10:05:23 -0000 1.31
+++ subscription-file.c 26 Feb 2006 10:15:42 -0000 1.32
@@ -3,7 +3,7 @@
#include "lib.h"
#include "istream.h"
#include "ostream.h"
-#include "safe-open.h"
+#include "nfs-workarounds.h"
#include "file-dotlock.h"
#include "mail-storage-private.h"
#include "subscription-file.h"
@@ -13,7 +13,7 @@
#define MAX_MAILBOX_LENGTH PATH_MAX
-#define SUBSCRIPTION_FILE_ESTALE_RETRY_COUNT 10
+#define SUBSCRIPTION_FILE_ESTALE_RETRY_COUNT NFS_ESTALE_RETRY_COUNT
#define SUBSCRIPTION_FILE_LOCK_TIMEOUT 120
#define SUBSCRIPTION_FILE_CHANGE_TIMEOUT 30
@@ -105,7 +105,7 @@
return -1;
}
- fd_in = safe_open(path, O_RDONLY);
+ fd_in = nfs_safe_open(path, O_RDONLY);
if (fd_in == -1 && errno != ENOENT) {
subsfile_set_syscall_error(storage, "open()", path);
(void)file_dotlock_delete(&dotlock);
@@ -172,7 +172,7 @@
pool_t pool;
int fd;
- fd = safe_open(path, O_RDONLY);
+ fd = nfs_safe_open(path, O_RDONLY);
if (fd == -1 && errno != ENOENT) {
subsfile_set_syscall_error(storage, "open()", path);
return NULL;
@@ -223,7 +223,7 @@
memory or try to play any guessing games. */
i_stream_destroy(&ctx->input);
- fd = safe_open(ctx->path, O_RDONLY);
+ fd = nfs_safe_open(ctx->path, O_RDONLY);
if (fd == -1) {
/* In case of ENOENT all the subscriptions got lost.
Just return end of subscriptions list in that
More information about the dovecot-cvs
mailing list