mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk libT) make tr_peerIoEnable*() inline functions
This commit is contained in:
parent
40a9133ced
commit
8433e0dd3b
2 changed files with 14 additions and 50 deletions
|
@ -713,42 +713,6 @@ tr_peerIoSetPeersId( tr_peerIo * io,
|
|||
***
|
||||
**/
|
||||
|
||||
void
|
||||
tr_peerIoEnableFEXT( tr_peerIo * io,
|
||||
tr_bool flag )
|
||||
{
|
||||
assert( tr_isPeerIo( io ) );
|
||||
assert( tr_isBool( flag ) );
|
||||
|
||||
dbgmsg( io, "setting FEXT support flag to %d", (flag!=0) );
|
||||
io->fastExtensionSupported = flag;
|
||||
}
|
||||
|
||||
void
|
||||
tr_peerIoEnableLTEP( tr_peerIo * io,
|
||||
tr_bool flag )
|
||||
{
|
||||
assert( tr_isPeerIo( io ) );
|
||||
assert( tr_isBool( flag ) );
|
||||
|
||||
dbgmsg( io, "setting LTEP support flag to %d", (flag!=0) );
|
||||
io->extendedProtocolSupported = flag;
|
||||
}
|
||||
|
||||
void
|
||||
tr_peerIoEnableDHT( tr_peerIo * io, tr_bool flag )
|
||||
{
|
||||
assert( tr_isPeerIo( io ) );
|
||||
assert( tr_isBool( flag ) );
|
||||
|
||||
dbgmsg( io, "setting DHT support flag to %d", (flag!=0) );
|
||||
io->dhtSupported = flag;
|
||||
}
|
||||
|
||||
/**
|
||||
***
|
||||
**/
|
||||
|
||||
static size_t
|
||||
getDesiredOutputBufferSize( const tr_peerIo * io, uint64_t now )
|
||||
{
|
||||
|
|
|
@ -149,30 +149,30 @@ tr_bool tr_isPeerIo ( const tr_peerIo * io );
|
|||
***
|
||||
**/
|
||||
|
||||
void tr_peerIoEnableLTEP( tr_peerIo * io, tr_bool flag );
|
||||
|
||||
static inline tr_bool tr_peerIoSupportsLTEP( const tr_peerIo * io )
|
||||
static inline void tr_peerIoEnableFEXT( tr_peerIo * io, tr_bool flag )
|
||||
{
|
||||
assert( tr_isPeerIo( io ) );
|
||||
|
||||
return io->extendedProtocolSupported;
|
||||
io->fastExtensionSupported = flag;
|
||||
}
|
||||
|
||||
void tr_peerIoEnableFEXT( tr_peerIo * io, tr_bool flag );
|
||||
|
||||
static inline tr_bool tr_peerIoSupportsFEXT( const tr_peerIo * io )
|
||||
{
|
||||
assert( tr_isPeerIo( io ) );
|
||||
|
||||
return io->fastExtensionSupported;
|
||||
}
|
||||
|
||||
void tr_peerIoEnableDHT( tr_peerIo * io, tr_bool flag );
|
||||
static inline void tr_peerIoEnableLTEP( tr_peerIo * io, tr_bool flag )
|
||||
{
|
||||
io->extendedProtocolSupported = flag;
|
||||
}
|
||||
static inline tr_bool tr_peerIoSupportsLTEP( const tr_peerIo * io )
|
||||
{
|
||||
return io->extendedProtocolSupported;
|
||||
}
|
||||
|
||||
static inline void tr_peerIoEnableDHT( tr_peerIo * io, tr_bool flag )
|
||||
{
|
||||
io->dhtSupported = flag;
|
||||
}
|
||||
static inline tr_bool tr_peerIoSupportsDHT( const tr_peerIo * io )
|
||||
{
|
||||
assert( tr_isPeerIo( io ) );
|
||||
|
||||
return io->dhtSupported;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue