sync the remote and cli's encryption options. man page cleanup.

This commit is contained in:
Charles Kerr 2008-07-21 16:09:14 +00:00
parent d439f8f5ed
commit 1737324118
2 changed files with 23 additions and 15 deletions

View File

@ -444,8 +444,9 @@ const struct tr_option options[] = {
{ 'c', "comment", "Set the new torrent's comment", "c", 1, "<comment>" },
{ 'd', "downlimit", "Set max download speed in KB/s", "d", 1, "<number>" },
{ 'D', "no-downlimit", "Don't limit the download speed", "D", 0, NULL },
{ 'e', "encryption", "Set encryption mode (required, preferred, tolerated)",
"e", 1, "<mode>" },
{ 910, "encryption-required", "Encrypt all peer connections", "er", 0, NULL },
{ 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL },
{ 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL },
{ 'f', "finish", "Set a script to run when the torrent finishes",
"f", 1, "<script>" },
{ 'g', "config-dir", "Where to find configuration files",
@ -505,13 +506,6 @@ parseCommandLine( int argc, const char ** argv )
case 'c': comment = optarg; break;
case 'd': downloadLimit = numarg( optarg ); break;
case 'D': downloadLimit = -1; break;
case 'e': if( !strcmp( optarg, "required" ) )
encryptionMode = TR_ENCRYPTION_REQUIRED;
else if( !strcmp( optarg, "tolerated" ) )
encryptionMode = TR_PLAINTEXT_PREFERRED;
else
encryptionMode = TR_ENCRYPTION_PREFERRED;
break;
case 'f': finishCall = optarg; break;
case 'g': configdir = optarg; break;
case 'i': showInfo = 1; break;
@ -526,6 +520,9 @@ parseCommandLine( int argc, const char ** argv )
case 'U': uploadLimit = -1; break;
case 'v': verify = 1; break;
case 'w': downloadDir = optarg; break;
case 910: encryptionMode = TR_ENCRYPTION_REQUIRED; break;
case 911: encryptionMode = TR_PLAINTEXT_PREFERRED; break;
case 912: encryptionMode = TR_ENCRYPTION_PREFERRED; break;
case TR_OPT_UNK: torrentPath = optarg; break;
default: return 1;
}

View File

@ -13,7 +13,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd April 18, 2007
.Dd July 21, 2008
.Dt TRANSMISSIONCLI 1
.Os
.Sh NAME
@ -36,7 +36,18 @@
.Op Fl r
.Ar new-torrent-file
.Nm
.Op options
.Op Fl b | B
.Op Fl d Ar number | Fl D
.Op Fl er | ep | et
.Op Fl f Ar script
.Op Fl g Ar directory
.Op Fl h
.Op Fl m | M
.Op Fl p
.Op Fl t
.Op Fl u Ar number | Fl U
.Op Fl v
.Op Fl w Ar directory
.Ar torrent-file
.Ek
.Sh DESCRIPTION
@ -67,11 +78,11 @@ Set the maximum download speed in KB/s
.It Fl D, -no-downlimit
Don't limit the download speed
.It Fl e Fl -encryption Ar required
Require all peer connections to be encrypted.
.It Fl e Fl -encryption Ar preferred
.It Fl er Fl -encryption-required
Encrypt all peer connections.
.It Fl ep Fl -encryption-preferred
Prefer encrypted peer connections.
.It Fl e Fl -encryption Ar tolerated
.It Fl et Fl -encryption-tolerated
Prefer unencrypted peer connections.
.It Fl f, -finish Ar script