mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
(trunk libT) break the mac build and introduce new crashes.
This is partially to address #4145 "Downloads stuck at 100%" by refactoring the bitset, bitfield, and tr_completion; however, the ripple effect is larger than usual so things may get worse in the short term before getting better. livings124: to fix the mac build, remove bitset.[ch] from xcode
This commit is contained in:
@@ -558,11 +558,12 @@ addField( const tr_torrent * tor, tr_benc * d, const char * key )
|
||||
else if( tr_streq( key, keylen, "peersSendingToUs" ) )
|
||||
tr_bencDictAddInt( d, key, st->peersSendingToUs );
|
||||
else if( tr_streq( key, keylen, "pieces" ) ) {
|
||||
tr_bitfield * bf = tr_cpCreatePieceBitfield( &tor->completion );
|
||||
char * str = tr_base64_encode( bf->bits, bf->byteCount, NULL );
|
||||
size_t byte_count = 0;
|
||||
void * bytes = tr_cpCreatePieceBitfield( &tor->completion, &byte_count );
|
||||
char * str = tr_base64_encode( bytes, byte_count, NULL );
|
||||
tr_bencDictAddStr( d, key, str!=NULL ? str : "" );
|
||||
tr_free( str );
|
||||
tr_bitfieldFree( bf );
|
||||
tr_free( bytes );
|
||||
}
|
||||
else if( tr_streq( key, keylen, "pieceCount" ) )
|
||||
tr_bencDictAddInt( d, key, inf->pieceCount );
|
||||
|
||||
Reference in New Issue
Block a user