[dovecot-cvs] dovecot/src/lib-storage/subscription-file
subscription-file.c, 1.32, 1.33
cras at dovecot.org
cras at dovecot.org
Sun Feb 26 12:32:25 EET 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/subscription-file
In directory talvi:/tmp/cvs-serv27978/lib-storage/subscription-file
Modified Files:
subscription-file.c
Log Message:
If we reach the NFS_ESTALE_RETRY_COUNT, give an ESTALE error message as
well.
Index: subscription-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/subscription-file/subscription-file.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- subscription-file.c 26 Feb 2006 10:15:42 -0000 1.32
+++ subscription-file.c 26 Feb 2006 10:32:23 -0000 1.33
@@ -42,7 +42,8 @@
}
static const char *next_line(struct mail_storage *storage, const char *path,
- struct istream *input, bool *failed_r)
+ struct istream *input, bool *failed_r,
+ bool ignore_estale)
{
const char *line;
@@ -54,7 +55,7 @@
switch (i_stream_read(input)) {
case -1:
if (input->stream_errno != 0 &&
- input->stream_errno != ESTALE) {
+ (input->stream_errno != ESTALE || !ignore_estale)) {
subsfile_set_syscall_error(storage,
"read()", path);
*failed_r = TRUE;
@@ -118,7 +119,8 @@
output = o_stream_create_file(fd_out, default_pool,
MAX_MAILBOX_LENGTH, FALSE);
found = FALSE;
- while ((line = next_line(storage, path, input, &failed)) != NULL) {
+ while ((line = next_line(storage, path, input,
+ &failed, FALSE)) != NULL) {
if (strcmp(line, name) == 0) {
found = TRUE;
if (!set)
@@ -212,7 +214,8 @@
for (i = 0;; i++) {
line = next_line(ctx->storage, ctx->path, ctx->input,
- &ctx->failed);
+ &ctx->failed,
+ i < SUBSCRIPTION_FILE_ESTALE_RETRY_COUNT);
if (ctx->input->stream_errno != ESTALE ||
i == SUBSCRIPTION_FILE_ESTALE_RETRY_COUNT)
break;
More information about the dovecot-cvs
mailing list