diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index b54772bdf..1a9d7f3b3 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1766,12 +1766,6 @@ tr_peerMgrAddIncoming( tr_peerMgr * manager, managerUnlock( manager ); } -static tr_bool -tr_isPex( const tr_pex * pex ) -{ - return pex && tr_isAddress( &pex->addr ); -} - void tr_peerMgrAddPex( tr_torrent * tor, uint8_t from, const tr_pex * pex, int8_t seedProbability ) diff --git a/libtransmission/peer-mgr.h b/libtransmission/peer-mgr.h index 9c9026bb7..ed64623d9 100644 --- a/libtransmission/peer-mgr.h +++ b/libtransmission/peer-mgr.h @@ -131,6 +131,12 @@ typedef struct tr_peer } tr_peer; +static inline tr_bool +tr_isPex( const tr_pex * pex ) +{ + return pex && tr_isAddress( &pex->addr ); +} + const tr_address * tr_peerAddress( const tr_peer * ); int tr_pexCompare( const void * a, const void * b ); diff --git a/libtransmission/resume.c b/libtransmission/resume.c index f285f02fd..ca9b6e4af 100644 --- a/libtransmission/resume.c +++ b/libtransmission/resume.c @@ -103,13 +103,6 @@ savePeers( tr_benc * dict, const tr_torrent * tor ) tr_free( pex ); } -static tr_bool -tr_isPex( const tr_pex * pex ) -{ - return tr_isAddress( &pex->addr ) - && ( pex->flags & 3 ) == pex->flags; -} - static int addPeers( tr_torrent * tor, const uint8_t * buf, int buflen ) {