1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

#1157 random port for daemon

This commit is contained in:
Mitchell Livingston 2009-04-03 01:26:18 +00:00
parent 96b726c08a
commit faa5d70c6f

View file

@ -78,6 +78,7 @@ static tr_option opts[] =
{ 'n', "auth", "Set authentication info", "n", 1, "<username:password>" },
{ 'N', "netrc", "Set authentication info from a .netrc file", "N", 1, "<filename>" },
{ 'p', "port", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "p", 1, "<port>" },
{ 'P', "random-port", "Random port for incomping peers", "P", 1, NULL },
{ 900, "priority-high", "Set the files' priorities as high", "ph", 1, "<files>" },
{ 901, "priority-normal", "Set the files' priorities as normal", "pn", 1, "<files>" },
{ 902, "priority-low", "Set the files' priorities as low", "pl", 1, "<files>" },
@ -419,6 +420,11 @@ readargs( int argc,
tr_bencDictAddInt( args, TR_PREFS_KEY_PEER_PORT, numarg( optarg ) );
break;
case 'P':
tr_bencDictAddStr( &top, "method", "session-set" );
tr_bencDictAddBool( args, TR_PREFS_KEY_PEER_PORT_RANDOM_ENABLED, TRUE);
break;
case 'r':
tr_bencDictAddStr( &top, "method", "torrent-remove" );
addIdArg( args, id );