Changeset 3792


Ignore:
Timestamp:
Nov 11, 2007, 4:33:04 PM (15 years ago)
Author:
charles
Message:

fix a bug in tr_stat's availability numbers, reported by BentMyWookie?

Location:
trunk/libtransmission
Files:
4 edited

Legend:

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

    r3788 r3792  
    13121312    for( i=0; i<size; ++i )
    13131313        if( peers[i]->io != NULL )
    1314             tr_bitfieldAnd( pieces, peers[i]->have );
     1314            tr_bitfieldOr( pieces, peers[i]->have );
    13151315
    13161316    managerUnlock( (tr_peerMgr*)manager );
  • trunk/libtransmission/peer-msgs.c

    r3785 r3792  
    17661766    return tr_bitfieldHas( peer->clientSuggestedPieces, index );
    17671767}
     1768
  • trunk/libtransmission/utils.c

    r3775 r3792  
    692692
    693693tr_bitfield*
    694 tr_bitfieldAnd( tr_bitfield * a, const tr_bitfield * b )
     694tr_bitfieldOr( tr_bitfield * a, const tr_bitfield * b )
    695695{
    696696    uint8_t *ait;
     
    700700
    701701    for( ait=a->bits, bit=b->bits, aend=ait+a->len; ait!=aend; ++ait, ++bit )
    702         *ait &= *bit;
     702        *ait |= *bit;
    703703
    704704    return a;
  • trunk/libtransmission/utils.h

    r3775 r3792  
    151151size_t tr_bitfieldCountTrueBits( const tr_bitfield* );
    152152
    153 tr_bitfield* tr_bitfieldAnd( tr_bitfield*, const tr_bitfield* );
     153tr_bitfield* tr_bitfieldOr( tr_bitfield*, const tr_bitfield* );
    154154
    155155#endif
Note: See TracChangeset for help on using the changeset viewer.