Changeset 12424
- Timestamp:
- May 10, 2011, 4:46:44 AM (10 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r12423 r12424 2829 2829 const int peerCount = tr_ptrArraySize( &t->peers ); 2830 2830 const time_t now = tr_time( ); 2831 2832 /* some cases where this function isn't necessary */ 2833 if( tr_torrentIsSeed( t->tor ) ) 2834 return; 2835 if ( tr_torrentIsPieceTransferAllowed( t->tor, TR_PEER_TO_CLIENT ) ) 2836 return; 2831 2837 2832 2838 /* decide HOW MANY peers to be interested in */ … … 3154 3160 if( tor->isRunning ) { 3155 3161 Torrent * t = tor->torrentPeers; 3156 if( tr_ptrArrayEmpty( &t->peers ) ) 3157 continue; 3158 rechokeUploads( t, now ); 3159 if( !tr_torrentIsSeed( tor ) && tr_torrentIsPieceTransferAllowed( tor, TR_PEER_TO_CLIENT ) ) 3162 if( !tr_ptrArrayEmpty( &t->peers ) ) { 3163 rechokeUploads( t, now ); 3160 3164 rechokeDownloads( t ); 3165 } 3161 3166 } 3162 3167 } -
trunk/libtransmission/torrent.c
r12397 r12424 869 869 } 870 870 871 { 872 tr_torrent * it = NULL; 873 tr_torrent * last = NULL; 874 while( ( it = tr_torrentNext( session, it ) ) ) 875 last = it; 876 877 if( !last ) 878 session->torrentList = tor; 879 else 880 last->next = tor; 881 ++session->torrentCount; 882 } 871 /* add the torrent to tr_session.torrentList */ 872 tor->next = session->torrentList; 873 session->torrentList = tor; 874 ++session->torrentCount; 883 875 884 876 /* if we don't have a local .torrent file already, assume the torrent is new */
Note: See TracChangeset
for help on using the changeset viewer.