]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fixes
authorTimo Sirainen <tss@iki.fi>
Sun, 30 May 2004 04:32:36 +0000 (07:32 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 30 May 2004 04:32:36 +0000 (07:32 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-sync-private.h
src/lib-index/mail-index-sync-update.c

index 0ec2bdb51cf0c09e53369342fd0b31cb8d36cc09..f7e02e9bc4d66466d1f82939afa2148482490138 100644 (file)
@@ -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);
index af93a0bc6b4a30d6413765cbcc2d1eb6cfa7b75b..57fcbbbcb5f5ad1035a3922a0f28a10ada131a2f 100644 (file)
@@ -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);
        }
 }