mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
attempt to add random-port functionality to the rpc code
This commit is contained in:
@@ -369,6 +369,7 @@
|
||||
"peer-limit-per-torrent" | number maximum global number of peers
|
||||
"pex-enabled" | 'boolean' true means allow pex in public torrents
|
||||
"peer-port" | number port number
|
||||
"peer-port-random-enabled" | 'boolean' true means pick a random peer port on launch
|
||||
"port-forwarding-enabled" | 'boolean' true means enabled
|
||||
"rpc-version" | number the current RPC API version
|
||||
"rpc-version-minimum" | number the minimum RPC API version supported
|
||||
|
||||
@@ -970,7 +970,9 @@ sessionSet( tr_session * session,
|
||||
tr_sessionSetPeerLimitPerTorrent( session, i );
|
||||
if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PEX_ENABLED, &boolVal ) )
|
||||
tr_sessionSetPexEnabled( session, boolVal );
|
||||
if( tr_bencDictFindInt( args_in, TR_PREFS_KEY_PEER_PORT, &i ) )
|
||||
if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PEER_PORT_RANDOM_ENABLED, &boolVal ) && boolVal )
|
||||
tr_sessionSetPeerPortRandom( session );
|
||||
else if( tr_bencDictFindInt( args_in, TR_PREFS_KEY_PEER_PORT, &i ) )
|
||||
tr_sessionSetPeerPort( session, i );
|
||||
if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PORT_FORWARDING, &boolVal ) )
|
||||
tr_sessionSetPortForwardingEnabled( session, boolVal );
|
||||
|
||||
Reference in New Issue
Block a user