Ignore:
Timestamp:
Sep 26, 2011, 10:50:42 PM (10 years ago)
Author:
jordan
Message:

(trunk libt) in tr_bitfieldSetRaw(), add a `bounded' argument for cases where we know how large the final bitfield will be. This can be used ensure that the excess bits at the end of the array are zeroed out and safe for bitfield.c's countArray() function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-msgs.c

    r12590 r12921  
    14151415            dbgmsg( msgs, "got a bitfield" );
    14161416            tr_peerIoReadBytes( msgs->peer->io, inbuf, tmp, msglen );
    1417             tr_bitfieldSetRaw( &msgs->peer->have, tmp, msglen );
     1417            tr_bitfieldSetRaw( &msgs->peer->have, tmp, msglen, tr_torrentHasMetadata( msgs->torrent ) );
    14181418            fireClientGotBitfield( msgs, &msgs->peer->have );
    14191419            updatePeerProgress( msgs );
Note: See TracChangeset for help on using the changeset viewer.