Changeset 1548


Ignore:
Timestamp:
Mar 8, 2007, 6:03:00 AM (15 years ago)
Author:
joshe
Message:

Fix saving of bitfield to resume file, this was broken in r1534.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pex/libtransmission/fastresume.h

    r1540 r1548  
    129129    uint64_t  total;
    130130    int       size;
     131    tr_bitfield_t * bitfield;
    131132
    132133    buf = malloc( FR_PROGRESS_LEN( tor ) );
     
    153154
    154155    /* Build and copy the bitfield for blocks */
    155     memcpy(buf + FR_MTIME_LEN( tor ), tr_cpBlockBitfield( tor->completion ),
    156            FR_BLOCK_BITFIELD_LEN( tor ) );
     156    bitfield = tr_cpBlockBitfield( tor->completion );
     157    assert( FR_BLOCK_BITFIELD_LEN( tor ) == bitfield->len );
     158    memcpy(buf + FR_MTIME_LEN( tor ), bitfield->bits, bitfield->len );
    157159
    158160    /* Copy the 'slotPiece' table */
Note: See TracChangeset for help on using the changeset viewer.