Changeset 8126


Ignore:
Timestamp:
Apr 3, 2009, 3:40:37 AM (13 years ago)
Author:
livings124
Message:

attempt to add random-port functionality to the rpc code

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/rpc-spec.txt

    r8124 r8126  
    370370   "pex-enabled"              | 'boolean'  true means allow pex in public torrents
    371371   "peer-port"                | number     port number
     372   "peer-port-random-enabled" | 'boolean'  true means pick a random peer port on launch
    372373   "port-forwarding-enabled"  | 'boolean'  true means enabled
    373374   "rpc-version"              | number     the current RPC API version
  • trunk/libtransmission/rpcimpl.c

    r8124 r8126  
    971971    if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PEX_ENABLED, &boolVal ) )
    972972        tr_sessionSetPexEnabled( session, boolVal );
    973     if( tr_bencDictFindInt( args_in, TR_PREFS_KEY_PEER_PORT, &i ) )
     973    if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PEER_PORT_RANDOM_ENABLED, &boolVal ) && boolVal )
     974        tr_sessionSetPeerPortRandom( session );
     975    else if( tr_bencDictFindInt( args_in, TR_PREFS_KEY_PEER_PORT, &i ) )
    974976        tr_sessionSetPeerPort( session, i );
    975977    if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PORT_FORWARDING, &boolVal ) )
Note: See TracChangeset for help on using the changeset viewer.