From a802852fefda0fc3d855e8762991d85929315ba3 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 20 Apr 2011 23:17:10 +0000 Subject: [PATCH] (trunk daemon) #2338 "Add uTP support" -- added er13's patch from comment:115 to add uTP enable/disable commands to transmission-remote. Thanks er13! --- daemon/daemon.c | 6 ++++++ daemon/transmission-daemon.1 | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/daemon/daemon.c b/daemon/daemon.c index db734cb43..175fe7934 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -109,6 +109,8 @@ static const struct tr_option options[] = { 'O', "no-dht", "Disable distributed hash tables (DHT)", "O", 0, NULL }, { 'y', "lpd", "Enable local peer discovery (LPD)", "y", 0, NULL }, { 'Y', "no-lpd", "Disable local peer discovery (LPD)", "Y", 0, NULL }, + { 830, "utp", "Enable uTP for peer connections", NULL, 0, NULL }, + { 831, "no-utp", "Disable uTP for peer connections", NULL, 0, NULL }, { 'P', "peerport", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "P", 1, "" }, { 'm', "portmap", "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL }, { 'M', "no-portmap", "Disable portmapping", "M", 0, NULL }, @@ -444,6 +446,10 @@ main( int argc, char ** argv ) break; case 812: tr_bencDictAddInt( &settings, TR_PREFS_KEY_MSGLEVEL, TR_MSG_DBG ); break; + case 830: tr_bencDictAddBool( &settings, TR_PREFS_KEY_UTP_ENABLED, true ); + break; + case 831: tr_bencDictAddBool( &settings, TR_PREFS_KEY_UTP_ENABLED, false ); + break; default: showUsage( ); break; } diff --git a/daemon/transmission-daemon.1 b/daemon/transmission-daemon.1 index 0f0cc3938..00b802077 100644 --- a/daemon/transmission-daemon.1 +++ b/daemon/transmission-daemon.1 @@ -24,6 +24,7 @@ .Op Fl l Ar limit .Op Fl L Ar limit .Op Fl er | ep | et +.Op Fl utp | no-utp .Op Fl V .Op Fl w Ar download-dir .Op Fl e Ar logfile @@ -114,6 +115,10 @@ Used for client authentication. Used for client authentication. .It Fl V Fl -version Show version number and exit +.It Fl -utp +Enable uTP for peer connections. +.It Fl -no-utp +Disable uTP for peer connections. .It Fl w Fl -download-dir Where to store downloaded data. .It Fl e Fl -logfile