Mercurial > dovecot > core-2.2
changeset 1042:002096c1af3c HEAD
Allow update_seen to be NULL
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 27 Jan 2003 07:44:03 +0200 |
parents | 47ecd950a702 |
children | cacabd33c68a |
files | src/lib-storage/index/index-fetch.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-fetch.c Mon Jan 27 06:23:45 2003 +0200 +++ b/src/lib-storage/index/index-fetch.c Mon Jan 27 07:44:03 2003 +0200 @@ -30,11 +30,11 @@ ctx = i_new(struct mail_fetch_context, 1); - if (!box->readonly) + if (!box->readonly && update_seen != NULL) *update_seen = FALSE; /* need exclusive lock to update the \Seen flags */ - if (*update_seen) { + if (update_seen != NULL && *update_seen) { if (!index_storage_lock(ibox, MAIL_LOCK_EXCLUSIVE)) return NULL; } @@ -42,7 +42,7 @@ if (!index_storage_sync_and_lock(ibox, TRUE, MAIL_LOCK_SHARED)) return NULL; - if (*update_seen && + if (update_seen != NULL && *update_seen && ibox->index->header->messages_count == ibox->index->header->seen_messages_count) { /* if all messages are already seen, there's no point in @@ -53,7 +53,7 @@ ctx->ibox = ibox; ctx->index = ibox->index; - ctx->update_seen = *update_seen; + ctx->update_seen = update_seen != NULL && *update_seen; index_mail_init(ibox, &ctx->mail, wanted_fields, NULL); ctx->msgset_ctx = index_messageset_init(ibox, messageset, uidset, TRUE);