tr_bencDictAddStr( session->metainfoLookup, hashString, filename );
}
-tr_torrent*
-tr_torrentNext( tr_session * session,
- tr_torrent * tor )
-{
- tr_torrent * ret;
-
- assert( !session || tr_isSession( session ) );
-
- if( !session )
- ret = NULL;
- else if( !tor )
- ret = session->torrentList;
- else
- ret = tor->next;
-
- return ret;
-}
-
/***
****
***/
void tr_torrentSetChecked( tr_torrent * tor, time_t when );
-tr_torrent* tr_torrentNext( tr_session * session,
- tr_torrent * current );
-
void tr_torrentCheckSeedLimit( tr_torrent * tor );
/** save a torrent's .resume file if it's changed since the last time it was saved */
tr_bool finishedSeedingByIdle;
};
+static inline tr_torrent*
+tr_torrentNext( tr_session * session, tr_torrent * current )
+{
+ return current ? current->next : session->torrentList;
+}
+
/* get the index of this piece's first block */
static inline tr_block_index_t
tr_torPieceFirstBlock( const tr_torrent * tor, const tr_piece_index_t piece )