]> granicus.if.org Git - transmission/commitdiff
sync the remote and cli's encryption options. man page cleanup.
authorCharles Kerr <charles@transmissionbt.com>
Mon, 21 Jul 2008 16:09:14 +0000 (16:09 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 21 Jul 2008 16:09:14 +0000 (16:09 +0000)
cli/cli.c
cli/transmissioncli.1

index 308b03c6054f5c434f221b2f8aa3d5c4f8198487..53dc0f444b302865d9230111f4584de9876ea590 100644 (file)
--- a/cli/cli.c
+++ b/cli/cli.c
@@ -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;
         }
index 632987bb42b93d7f9b9c1259764c0f6bfe130fad..f1c404b26948f6227b9b83a23e6539621163702e 100644 (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
 .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