Ignore:
Timestamp:
Apr 10, 2009, 5:34:25 PM (13 years ago)
Author:
charles
Message:

(1.5x libT) various backports for 1.52:
(1) recognize Aria2 as a client
(2) remove jhujhiti's tr_suspectAddress(), since he removed it from trunka
(3) on Mac, better detection of where the Web UI files are located
(4) reintroduce the web task queue
(5) various minor formatting changes to reduce the diffs between 1.52 and trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/libtransmission/torrent.c

    r7855 r8204  
    5959    tr_torrent * tor = NULL;
    6060
    61     while( ( tor = tr_torrentNext( session, tor ) ) )
     61    while(( tor = tr_torrentNext( session, tor )))
    6262        if( tor->uniqueId == id )
    6363            return tor;
     
    7171    tr_torrent * tor = NULL;
    7272
    73     while( ( tor = tr_torrentNext( session, tor ) ) )
    74         if( !strcmp( str, tor->info.hashString ) )
     73    while(( tor = tr_torrentNext( session, tor )))
     74        if( !strcmp( str, tor->info.hashString ))
    7575            return tor;
    7676
     
    8383    tr_torrent * tor = NULL;
    8484
    85     while( ( tor = tr_torrentNext( session, tor ) ) )
     85    while(( tor = tr_torrentNext( session, tor )))
    8686        if( *tor->info.hash == *torrentHash )
    8787            if( !memcmp( tor->info.hash, torrentHash, SHA_DIGEST_LENGTH ) )
     
    9797    tr_torrent * tor = NULL;
    9898
    99     while( ( tor = tr_torrentNext( session, tor ) ) )
     99    while(( tor = tr_torrentNext( session, tor )))
    100100        if( !memcmp( tor->obfuscatedHash, obfuscatedTorrentHash,
    101101                     SHA_DIGEST_LENGTH ) )
     
    114114                        tr_speedlimit mode )
    115115{
    116     assert( tor != NULL );
     116    assert( tr_isTorrent( tor ) );
    117117    assert( tr_isDirection( dir ) );
    118118    assert( mode==TR_SPEEDLIMIT_GLOBAL || mode==TR_SPEEDLIMIT_SINGLE || mode==TR_SPEEDLIMIT_UNLIMITED  );
     
    128128                        tr_direction       dir )
    129129{
    130     assert( tor != NULL );
     130    assert( tr_isTorrent( tor ) );
    131131    assert( tr_isDirection( dir ) );
    132132
     
    10711071    tr_globalLock( tor->session );
    10721072
    1073     tor->isRunning = 1;
     1073    tor->isRunning = TRUE;
    10741074    *tor->errorString = '\0';
    10751075    tr_torrentResetTransferStats( tor );
     
    14401440
    14411441static void
    1442 setFileDND( tr_torrent *    tor,
    1443             tr_file_index_t fileIndex,
    1444             int             doDownload )
     1442setFileDND( tr_torrent * tor, tr_file_index_t fileIndex, int doDownload )
    14451443{
    14461444    tr_file *        file;
     
    14971495
    14981496void
    1499 tr_torrentInitFileDLs( tr_torrent *      tor,
     1497tr_torrentInitFileDLs( tr_torrent      * tor,
    15001498                       tr_file_index_t * files,
    15011499                       tr_file_index_t   fileCount,
     
    15081506    tr_torrentLock( tor );
    15091507
    1510     for( i = 0; i < fileCount; ++i )
     1508    for( i=0; i<fileCount; ++i )
    15111509        setFileDND( tor, files[i], doDownload );
    15121510    tr_cpInvalidateDND ( &tor->completion );
     
    16441642
    16451643    if( isChecked )
    1646         tr_bitfieldAddRange ( &tor->checkedPieces, begin, end );
     1644        tr_bitfieldAddRange( &tor->checkedPieces, begin, end );
    16471645    else
    1648         tr_bitfieldRemRange ( &tor->checkedPieces, begin, end );
     1646        tr_bitfieldRemRange( &tor->checkedPieces, begin, end );
    16491647}
    16501648
     
    17771775**/
    17781776
    1779 /** @deprecated this method will be removed in 1.40 */
    17801777void
    17811778tr_torrentSetAddedDate( tr_torrent * tor,
     
    17871784}
    17881785
    1789 /** @deprecated this method will be removed in 1.40 */
    17901786void
    17911787tr_torrentSetActivityDate( tr_torrent * tor,
     
    17971793}
    17981794
    1799 /** @deprecated this method will be removed in 1.40 */
    18001795void
    18011796tr_torrentSetDoneDate( tr_torrent * tor,
Note: See TracChangeset for help on using the changeset viewer.