From: Timo Sirainen Date: Sun, 30 May 2004 04:32:36 +0000 (+0300) Subject: fixes X-Git-Tag: 1.1.alpha1~4020 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8603622835ec0566e49056ee839ef5992b48c46d;p=thirdparty%2Fdovecot%2Fcore.git fixes --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-sync-private.h b/src/lib-index/mail-index-sync-private.h index 0ec2bdb51c..f7e02e9bc4 100644 --- a/src/lib-index/mail-index-sync-private.h +++ b/src/lib-index/mail-index-sync-private.h @@ -26,9 +26,6 @@ extern struct mail_transaction_map_functions mail_index_map_sync_funcs; int mail_index_sync_update_index(struct mail_index_sync_ctx *sync_ctx); -void mail_index_sync_expunge(struct mail_index_view *view, - const struct mail_transaction_expunge *e); - void mail_index_sync_get_expunge(struct mail_index_sync_rec *rec, const struct mail_transaction_expunge *exp); diff --git a/src/lib-index/mail-index-sync-update.c b/src/lib-index/mail-index-sync-update.c index af93a0bc6b..57fcbbbcb5 100644 --- a/src/lib-index/mail-index-sync-update.c +++ b/src/lib-index/mail-index-sync-update.c @@ -53,8 +53,8 @@ mail_index_header_update_lowwaters(struct mail_index_header *hdr, hdr->first_deleted_uid_lowwater = rec->uid; } -void mail_index_sync_expunge(struct mail_index_view *view, - const struct mail_transaction_expunge *e) +static void mail_index_sync_expunge(struct mail_index_view *view, + const struct mail_transaction_expunge *e) { struct mail_index_map *map = view->map; struct mail_index_header *hdr = &map->hdr_copy; @@ -84,7 +84,8 @@ void mail_index_sync_expunge(struct mail_index_view *view, view->messages_count -= count; if (map->buffer != NULL) { - buffer_set_used_size(map->buffer, map->records_count); + buffer_set_used_size(map->buffer, + map->records_count * sizeof(*rec)); map->records = buffer_get_modifyable_data(map->buffer, NULL); } }