• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/transmission/transmission-2.73/libtransmission/

Lines Matching defs:torrent

32 #include "torrent.h"
33 #include "torrent-magnet.h"
184 tr_torrent * torrent;
222 return msgs->torrent->session;
246 tr_torrentName( msgs->torrent ),
630 const tr_info * inf = &msgs->torrent->info;
766 return tr_torrentReqIsValid( peer->torrent, index, offset, length );
780 blockToReq( msgs->torrent, block, &req );
805 if( tr_torrentIsPrivate( msgs->torrent ) )
811 if( !tr_torrentAllowsPex( msgs->torrent ) )
822 if( allow_metadata_xfer && tr_torrentHasMetadata( msgs->torrent )
823 && ( msgs->torrent->infoDictLength > 0 ) )
824 tr_bencDictAddInt( &val, "metadata_size", msgs->torrent->infoDictLength );
827 tr_bencDictAddInt( &val, "upload_only", tr_torrentIsSeed( msgs->torrent ) );
902 tr_peerMgrSetUtpFailed( msgs->torrent,
910 tr_torrentSetMetadataSizeHint( msgs->torrent, i );
931 tr_peerMgrAddPex( msgs->torrent, TR_PEER_FROM_LTEP, &pex, seedProbability );
940 tr_peerMgrAddPex( msgs->torrent, TR_PEER_FROM_LTEP, &pex, seedProbability );
982 && ( !tr_torrentHasMetadata( msgs->torrent ) )
987 tr_torrentSetMetadataPiece( msgs->torrent, piece, benc_end, pieceLen );
993 && tr_torrentHasMetadata( msgs->torrent )
994 && !tr_torrentIsPrivate( msgs->torrent )
1034 tr_torrent * tor = msgs->torrent;
1181 tr_peerUpdateProgress( msgs->torrent, msgs->peer );
1201 tr_cachePrefetchBlock( getSession(msgs)->cache, msgs->torrent, req->index, req->offset, req->length );
1212 const int clientHasPiece = reqIsValid && tr_cpPieceIsComplete( &msgs->torrent->completion, req->index );
1255 if( tr_torrentHasMetadata( msg->torrent ) )
1256 return len == ( msg->torrent->info.pieceCount + 7u ) / 8u + 1u;
1399 if( tr_torrentHasMetadata( msgs->torrent )
1400 && ( ui32 >= msgs->torrent->info.pieceCount ) )
1418 tr_bitfieldSetRaw( &msgs->peer->have, tmp, msglen, tr_torrentHasMetadata( msgs->torrent ) );
1559 tr_torrent * tor = msgs->torrent;
1565 if( req->length != tr_torBlockCountBytes( msgs->torrent, block ) ) {
1567 tr_torBlockCountBytes( msgs->torrent, block ), req->length );
1573 if( !tr_peerMgrDidPeerRequest( msgs->torrent, msgs->peer, block ) ) {
1577 if( tr_cpPieceIsComplete( &msgs->torrent->completion, req->index ) ) {
1655 return block == _tr_block( msgs->torrent,
1667 const tr_torrent * const torrent = msgs->torrent;
1670 if( tr_torrentIsSeed( torrent ) || !tr_torrentHasMetadata( torrent )
1688 if( tr_torrentUsesSpeedLimit( torrent, TR_PEER_TO_CLIENT ) )
1689 rate_Bps = MIN( rate_Bps, tr_torrentGetSpeedLimit_Bps( torrent, TR_PEER_TO_CLIENT ) );
1692 if( tr_torrentUsesSessionLimits( torrent ) &&
1693 tr_sessionGetActiveSpeedLimit_Bps( torrent->session, TR_PEER_TO_CLIENT, &irate_Bps ) )
1698 estimatedBlocksInPeriod = ( rate_Bps * seconds ) / torrent->blockSize;
1714 && tr_torrentGetNextMetadataRequest( msgs->torrent, now, &piece ) )
1745 if( tr_torrentIsPieceTransferAllowed( msgs->torrent, TR_PEER_TO_CLIENT )
1754 tr_peerMgrGetNextRequests( msgs->torrent, msgs->peer, numwant, blocks, &n, false );
1759 blockToReq( msgs->torrent, blocks[i], &req );
1808 data = tr_torrentGetMetadataPiece( msgs->torrent, piece, &dataLen );
1819 tr_bencDictAddInt( &tmp, "total_size", msgs->torrent->infoDictLength );
1867 if( ( tr_peerIoGetWriteBufferSpace( msgs->peer->io, now ) >= msgs->torrent->blockSize )
1873 && tr_cpPieceIsComplete( &msgs->torrent->completion, req.index ) )
1889 err = tr_cacheReadBlock( getSession(msgs)->cache, msgs->torrent, req.index, req.offset, req.length, iovec[0].iov_base );
1894 if( !err && tr_torrentPieceNeedsCheck( msgs->torrent, req.index ) )
1895 if(( err = !tr_torrentCheckPiece( msgs->torrent, req.index )))
1896 tr_torrentSetLocalError( msgs->torrent, _( "Please Verify Local Data! Piece #%zu is corrupt." ), (size_t)req.index );
1991 assert( tr_torrentHasMetadata( msgs->torrent ) );
1993 bytes = tr_cpCreatePieceBitfield( &msgs->torrent->completion, &byte_count );
2008 if( fext && tr_cpHasAll( &msgs->torrent->completion ) )
2012 else if( fext && tr_cpHasNone( &msgs->torrent->completion ) )
2016 else if( !tr_cpHasNone( &msgs->torrent->completion ) )
2147 if( msgs->peerSupportsPex && tr_torrentAllowsPex( msgs->torrent ) )
2153 const int newCount = tr_peerMgrGetPeers( msgs->torrent, &newPex, TR_AF_INET, TR_PEERS_CONNECTED, MAX_PEX_PEER_COUNT );
2154 const int newCount6 = tr_peerMgrGetPeers( msgs->torrent, &newPex6, TR_AF_INET6, TR_PEERS_CONNECTED, MAX_PEX_PEER_COUNT );
2327 tr_peerMsgsNew( struct tr_torrent * torrent,
2341 m->torrent = torrent;
2352 if( tr_torrentAllowsPex( torrent ) ) {
2353 m->pexTimer = evtimer_new( torrent->session->event_base, pexPulse, m );
2359 tr_peerMgrSetUtpSupported( torrent, addr );
2360 tr_peerMgrSetUtpFailed( torrent, addr, false );
2368 if( tr_dhtEnabled( torrent->session ) && tr_peerIoSupportsDHT( peer->io ))
2373 protocolSendPort( m, tr_dhtPort( torrent->session ) );