# HG changeset patch # User Timo Sirainen # Date 1196497753 -7200 # Node ID 2bef19ae523376d17bbe3044c2045a14fbabe1b8 # Parent 15df8bb27d7a6fc23525141b33537d8200b558d6 Removed pointless maildir_uidlist_sync_next_pre() calling. diff -r 15df8bb27d7a -r 2bef19ae5233 src/lib-storage/index/maildir/maildir-sync.c --- a/src/lib-storage/index/maildir/maildir-sync.c Sat Dec 01 09:51:43 2007 +0200 +++ b/src/lib-storage/index/maildir/maildir-sync.c Sat Dec 01 10:29:13 2007 +0200 @@ -437,17 +437,6 @@ if (dp->d_name[0] == '.') continue; - ret = maildir_uidlist_sync_next_pre(ctx->uidlist_sync_ctx, - dp->d_name); - if (ret == 0) { - /* new file and we couldn't lock uidlist, check this - later in next sync. */ - dir_changed = TRUE; - continue; - } - if (ret < 0) - break; - check_touch = FALSE; flags = 0; if (move_new) { diff -r 15df8bb27d7a -r 2bef19ae5233 src/lib-storage/index/maildir/maildir-uidlist.c --- a/src/lib-storage/index/maildir/maildir-uidlist.c Sat Dec 01 09:51:43 2007 +0200 +++ b/src/lib-storage/index/maildir/maildir-uidlist.c Sat Dec 01 10:29:13 2007 +0200 @@ -1149,27 +1149,6 @@ ctx->finished = FALSE; } -int maildir_uidlist_sync_next_pre(struct maildir_uidlist_sync_ctx *ctx, - const char *filename) -{ - if (!UIDLIST_IS_LOCKED(ctx->uidlist) && - hash_lookup(ctx->uidlist->files, filename) == NULL && - (ctx->partial || hash_lookup(ctx->files, filename) == NULL)) { - if (!ctx->uidlist->initial_read) { - /* first time reading the uidlist */ - if (maildir_uidlist_refresh(ctx->uidlist) < 0) { - ctx->failed = TRUE; - return -1; - } - return maildir_uidlist_sync_next_pre(ctx, filename); - } - - return 0; - } - - return 1; -} - int maildir_uidlist_sync_next(struct maildir_uidlist_sync_ctx *ctx, const char *filename, enum maildir_uidlist_rec_flag flags) diff -r 15df8bb27d7a -r 2bef19ae5233 src/lib-storage/index/maildir/maildir-uidlist.h --- a/src/lib-storage/index/maildir/maildir-uidlist.h Sat Dec 01 09:51:43 2007 +0200 +++ b/src/lib-storage/index/maildir/maildir-uidlist.h Sat Dec 01 10:29:13 2007 +0200 @@ -83,9 +83,6 @@ int maildir_uidlist_sync_init(struct maildir_uidlist *uidlist, enum maildir_uidlist_sync_flags sync_flags, struct maildir_uidlist_sync_ctx **sync_ctx_r); -/* Returns 1 = ok, -1 = error, 0 = new file and dovecot-uidlist is locked */ -int maildir_uidlist_sync_next_pre(struct maildir_uidlist_sync_ctx *ctx, - const char *filename); int maildir_uidlist_sync_next(struct maildir_uidlist_sync_ctx *ctx, const char *filename, enum maildir_uidlist_rec_flag flags);