mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
(trunk daemon) #3060 "local peer discovery" -- fix bugs reported by Eszet (thanks Eszet :)
This commit is contained in:
parent
77ef2c1e0c
commit
4e58a183bb
3 changed files with 13 additions and 13 deletions
|
@ -85,8 +85,8 @@ static const struct tr_option options[] =
|
|||
{ 800, "paused", "Pause all torrents on startup", NULL, 0, NULL },
|
||||
{ 'o', "dht", "Enable distributed hash tables (DHT)", "o", 0, NULL },
|
||||
{ 'O', "no-dht", "Disable distributed hash tables (DHT)", "O", 0, NULL },
|
||||
{ 'z', "lds", "Enable local peer discovery (LPD)", "z", 0, NULL },
|
||||
{ 'Z', "no-lds", "Disable local peer discovery (LPD)", "Z", 0, NULL },
|
||||
{ 'y', "lpd", "Enable local peer discovery (LPD)", "y", 0, NULL },
|
||||
{ 'Y', "no-lpd", "Disable local peer discovery (LPD)", "Y", 0, NULL },
|
||||
{ 'P', "peerport", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "P", 1, "<port>" },
|
||||
{ 'm', "portmap", "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL },
|
||||
{ 'M', "no-portmap", "Disable portmapping", "M", 0, NULL },
|
||||
|
@ -408,9 +408,9 @@ main( int argc, char ** argv )
|
|||
case 954:
|
||||
tr_bencDictAddBool( &settings, TR_PREFS_KEY_RATIO_ENABLED, FALSE );
|
||||
break;
|
||||
case 'z': tr_bencDictAddBool( &settings, TR_PREFS_KEY_LPD_ENABLED, TRUE );
|
||||
case 'y': tr_bencDictAddBool( &settings, TR_PREFS_KEY_LPD_ENABLED, TRUE );
|
||||
break;
|
||||
case 'Z': tr_bencDictAddBool( &settings, TR_PREFS_KEY_LPD_ENABLED, FALSE );
|
||||
case 'Y': tr_bencDictAddBool( &settings, TR_PREFS_KEY_LPD_ENABLED, FALSE );
|
||||
break;
|
||||
default: showUsage( );
|
||||
break;
|
||||
|
|
|
@ -257,8 +257,8 @@ static tr_option opts[] =
|
|||
{ 'w', "download-dir", "When adding a new torrent, set its download folder. Otherwise, set the default download folder", "w", 1, "<path>" },
|
||||
{ 'x', "pex", "Enable peer exchange (PEX)", "x", 0, NULL },
|
||||
{ 'X', "no-pex", "Disable peer exchange (PEX)", "X", 0, NULL },
|
||||
{ 'z', "lds", "Enable local peer discovery (LPD)", "z", 0, NULL },
|
||||
{ 'Z', "no-lds", "Disable local peer discovery (LPD)", "Z", 0, NULL },
|
||||
{ 'y', "lpd", "Enable local peer discovery (LPD)", "y", 0, NULL },
|
||||
{ 'Y', "no-lpd", "Disable local peer discovery (LPD)", "Y", 0, NULL },
|
||||
{ 940, "peer-info", "List the current torrent(s)' peers", "pi", 0, NULL },
|
||||
{ 0, NULL, NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
@ -327,8 +327,8 @@ getOptMode( int val )
|
|||
case 'P': /* random incoming peer port */
|
||||
case 'x': /* pex */
|
||||
case 'X': /* no-pex */
|
||||
case 'z': /* lds */
|
||||
case 'Z': /* no-lds */
|
||||
case 'y': /* lpd */
|
||||
case 'Y': /* no-lpd */
|
||||
case 800: /* torrent-done-script */
|
||||
case 801: /* no-torrent-done-script */
|
||||
case 970: /* alt-speed */
|
||||
|
@ -1832,9 +1832,9 @@ processArgs( const char * host, int port, int argc, const char ** argv )
|
|||
break;
|
||||
case 'X': tr_bencDictAddBool( args, TR_PREFS_KEY_PEX_ENABLED, FALSE );
|
||||
break;
|
||||
case 'z': tr_bencDictAddBool( args, TR_PREFS_KEY_LPD_ENABLED, TRUE );
|
||||
case 'y': tr_bencDictAddBool( args, TR_PREFS_KEY_LPD_ENABLED, TRUE );
|
||||
break;
|
||||
case 'Z': tr_bencDictAddBool( args, TR_PREFS_KEY_LPD_ENABLED, FALSE );
|
||||
case 'Y': tr_bencDictAddBool( args, TR_PREFS_KEY_LPD_ENABLED, FALSE );
|
||||
break;
|
||||
case 953: tr_bencDictAddReal( args, "seedRatioLimit", atof(optarg) );
|
||||
tr_bencDictAddBool( args, "seedRatioLimited", TRUE );
|
||||
|
|
|
@ -55,7 +55,7 @@ and
|
|||
.Op Fl V
|
||||
.Op Fl w Ar download-dir
|
||||
.Op Fl x | X
|
||||
.Op Fl z | Z
|
||||
.Op Fl y | Y
|
||||
.Op Fl pi
|
||||
.Ek
|
||||
.Sh DESCRIPTION
|
||||
|
@ -253,9 +253,9 @@ as the default location for newly added torrents to download files to.
|
|||
Enable peer exchange (PEX).
|
||||
.It Fl X Fl -no-pex
|
||||
Disable peer exchange (PEX).
|
||||
.It Fl z Fl -lds
|
||||
.It Fl y Fl -lds
|
||||
Enable local peer discovery (LPD).
|
||||
.It Fl Z Fl -no-lds
|
||||
.It Fl Y Fl -no-lds
|
||||
Disable local peer discovery (LPD).
|
||||
.It Fl pi Fl -peer-info
|
||||
List the current torrent's connected peers.
|
||||
|
|
Loading…
Reference in a new issue