]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
header and extra_rec syncing crashed because of recent changes.
authorTimo Sirainen <tss@iki.fi>
Sun, 4 Jul 2004 21:10:32 +0000 (00:10 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 Jul 2004 21:10:32 +0000 (00:10 +0300)
--HG--
branch : HEAD

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

index 25e21bee1e8ba265aad57f60b23a396dd9c1991a..0d16d5e3284828b0ca687f22426ff8752d44b9c0 100644 (file)
@@ -258,10 +258,10 @@ static int sync_cache_update(const struct mail_transaction_cache_update *u,
 static int sync_header_update(const struct mail_transaction_header_update *u,
                              void *context)
 {
-       struct mail_index_view *view = context;
+        struct mail_index_sync_ctx *sync_ctx = context;
        void *data;
 
-       data = PTR_OFFSET(&view->map->hdr_copy, u->offset);
+       data = PTR_OFFSET(&sync_ctx->view->map->hdr_copy, u->offset);
        memcpy(data, u->data, u->size);
        return 1;
 }
@@ -271,7 +271,8 @@ sync_extra_rec_update(const struct mail_transaction_extra_rec_header *hdr,
                      const struct mail_transaction_extra_rec_update *u,
                      void *context)
 {
-       struct mail_index_view *view = context;
+        struct mail_index_sync_ctx *sync_ctx = context;
+       struct mail_index_view *view = sync_ctx->view;
        struct mail_index_record *rec;
        uint32_t seq;
        uint16_t offset, size;