From: Hans Leidekker Subject: [3/6] msi: Use the last sequence number specified for patch media when updating media records. Message-Id: <1427290364.3059.12.camel@codeweavers.com> Date: Wed, 25 Mar 2015 14:32:44 +0100 --- dlls/msi/msipriv.h | 1 - dlls/msi/patch.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index fd7667e..ac7ba32 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -193,7 +193,6 @@ typedef struct tagMSIPATCHINFO MSIPATCHSTATE state; BOOL delete_on_close; UINT disk_id; - UINT last_sequence; } MSIPATCHINFO; typedef struct tagMSIBINARY diff --git a/dlls/msi/patch.c b/dlls/msi/patch.c index 838dbb0..b7bf2ef 100644 --- a/dlls/msi/patch.c +++ b/dlls/msi/patch.c @@ -741,7 +741,7 @@ static UINT patch_add_media( MSIPACKAGE *package, IStorage *storage, MSIPATCHINF disk_id = package->db->media_transform_disk_id; TRACE("disk id %u\n", disk_id); - TRACE("last sequence %u\n", patch->last_sequence); + TRACE("last sequence %u\n", media->last_sequence); TRACE("prompt %s\n", debugstr_w(media->prompt)); TRACE("cabinet %s\n", debugstr_w(media->cabinet)); TRACE("volume %s\n", debugstr_w(media->volume)); @@ -749,7 +749,7 @@ static UINT patch_add_media( MSIPACKAGE *package, IStorage *storage, MSIPATCHINF rec = MSI_CreateRecord( 6 ); MSI_RecordSetInteger( rec, 1, disk_id ); - MSI_RecordSetInteger( rec, 2, patch->last_sequence ); + MSI_RecordSetInteger( rec, 2, media->last_sequence ); MSI_RecordSetStringW( rec, 3, media->prompt ); MSI_RecordSetStringW( rec, 4, media->cabinet ); MSI_RecordSetStringW( rec, 5, media->volume ); @@ -828,7 +828,6 @@ static UINT patch_set_offsets( MSIDATABASE *db, MSIPATCHINFO *patch ) if (r != ERROR_SUCCESS) ERR("Failed to update Media table entry, expect breakage (%u)\n", r); - patch->last_sequence = last_sequence; db->media_transform_offset = last_sequence + 1; patch_offset_list_free( pos );