Ignore:
Timestamp:
Aug 21, 2008, 2:57:59 PM (13 years ago)
Author:
charles
Message:

bencode cleanup: remove unused functions and unnecessary #includes

File:
1 edited

Legend:

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

    r6600 r6612  
    18591859        const int newCount = tr_peerMgrGetPeers( msgs->session->peerMgr, msgs->torrent->info.hash, &newPex );
    18601860        PexDiffs diffs;
    1861         tr_benc val, *added, *dropped;
     1861        tr_benc val;
    18621862        uint8_t *tmp, *walk;
    18631863        char * benc;
     
    18871887
    18881888        /* "added" */
    1889         added = tr_bencDictAdd( &val, "added" );
    18901889        tmp = walk = tr_new( uint8_t, diffs.addedCount * 6 );
    18911890        for( i=0; i<diffs.addedCount; ++i ) {
     
    18941893        }
    18951894        assert( ( walk - tmp ) == diffs.addedCount * 6 );
    1896         tr_bencInitStr( added, tmp, walk-tmp, FALSE );
     1895        tr_bencDictAddRaw( &val, "added", tmp, walk-tmp );
     1896        tr_free( tmp );
    18971897
    18981898        /* "added.f" */
     
    19051905
    19061906        /* "dropped" */
    1907         dropped = tr_bencDictAdd( &val, "dropped" );
    19081907        tmp = walk = tr_new( uint8_t, diffs.droppedCount * 6 );
    19091908        for( i=0; i<diffs.droppedCount; ++i ) {
     
    19121911        }
    19131912        assert( ( walk - tmp ) == diffs.droppedCount * 6 );
    1914         tr_bencInitStr( dropped, tmp, walk-tmp, FALSE );
     1913        tr_bencDictAddRaw( &val, "dropped", tmp, walk-tmp );
     1914        tr_free( tmp );
    19151915
    19161916        /* write the pex message */
Note: See TracChangeset for help on using the changeset viewer.