Ignore:
Timestamp:
Mar 28, 2011, 4:31:05 PM (11 years ago)
Author:
jordan
Message:

(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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpcimpl.c

    r12228 r12248  
    559559        tr_bencDictAddInt( d, key, st->peersSendingToUs );
    560560    else if( tr_streq( key, keylen, "pieces" ) ) {
    561         tr_bitfield * bf = tr_cpCreatePieceBitfield( &tor->completion );
    562         char * str = tr_base64_encode( bf->bits, bf->byteCount, NULL );
     561        size_t byte_count = 0;
     562        void * bytes = tr_cpCreatePieceBitfield( &tor->completion, &byte_count );
     563        char * str = tr_base64_encode( bytes, byte_count, NULL );
    563564        tr_bencDictAddStr( d, key, str!=NULL ? str : "" );
    564565        tr_free( str );
    565         tr_bitfieldFree( bf );
     566        tr_free( bytes );
    566567    }
    567568    else if( tr_streq( key, keylen, "pieceCount" ) )
Note: See TracChangeset for help on using the changeset viewer.