Changeset 10132


Ignore:
Timestamp:
Feb 7, 2010, 7:20:00 PM (12 years ago)
Author:
charles
Message:

(trunk daemon) #2875 "add incomplete-dir, dht, and seedratio options to daemon" -- committed to trunk for 1.90

Location:
trunk/daemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon.c

    r10031 r10132  
    6969    { 'c', "watch-dir", "Directory to watch for new .torrent files", "c", 1, "<directory>" },
    7070    { 'C', "no-watch-dir", "Disable the watch-dir", "C", 0, NULL },
     71    { 941, "incomplete-dir", "Where to store new torrents until they're complete", NULL, 1, "<directory>" },
     72    { 942, "no-incomplete-dir", "Don't store incomplete torrents in a different location", NULL, 0, NULL },
    7173    { 'd', "dump-settings", "Dump the settings and exit", "d", 0, NULL },
    7274    { 'f', "foreground", "Run in the foreground instead of daemonizing", "f", 0, NULL },
     
    8082    { 'w', "download-dir", "Where to save downloaded data", "w", 1, "<path>" },
    8183    { 800, "paused", "Pause all torrents on startup", NULL, 0, NULL },
     84    { 'o', "dht", "Enable distributed hash tables (DHT)", "o", 0, NULL },
     85    { 'O', "no-dht", "Disable distributed hash tables (DHT)", "O", 0, NULL },
    8286    { 'P', "peerport", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "P", 1, "<port>" },
    8387    { 'm', "portmap", "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL },
     
    9195    { 'I', "bind-address-ipv6", "Where to listen for peer connections", "I", 1, "<ipv6 address>" },
    9296    { 'r', "rpc-bind-address", "Where to listen for RPC connections", "r", 1, "<ipv4 address>" },
     97    { 953, "global-seedratio", "All torrents, unless overridden by a per-torrent setting, should seed until a specific ratio", "gsr", 1, "ratio" },
     98    { 954, "no-global-seedratio", "All torrents, unless overridden by a per-torrent setting, should seed regardless of ratio", "GSR", 0, NULL },
    9399    { 0, NULL, NULL, NULL, 0, NULL }
    94100};
     
    312318            case 'C': tr_bencDictAddBool( &settings, PREF_KEY_DIR_WATCH_ENABLED, FALSE );
    313319                      break;
     320            case 941:
     321                      tr_bencDictAddStr( &settings, TR_PREFS_KEY_INCOMPLETE_DIR, optarg );
     322                      tr_bencDictAddBool( &settings, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, TRUE );
     323                      break;
     324            case 942:
     325                      tr_bencDictAddBool( &settings, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, FALSE );
     326                      break;
    314327            case 'd': dumpSettings = TRUE;
    315328                      break;
     
    321334                      fprintf(stderr, "Transmission %s\n", LONG_VERSION_STRING);
    322335                      exit( 0 );
     336            case 'o':
     337                      tr_bencDictAddBool( &settings, TR_PREFS_KEY_DHT_ENABLED, TRUE );
     338                      break;
     339            case 'O':
     340                      tr_bencDictAddBool( &settings, TR_PREFS_KEY_DHT_ENABLED, FALSE );
     341                      break;
    323342            case 'p': tr_bencDictAddInt( &settings, TR_PREFS_KEY_RPC_PORT, atoi( optarg ) );
    324343                      break;
     
    360379                      tr_bencDictAddStr( &settings, TR_PREFS_KEY_RPC_BIND_ADDRESS, optarg );
    361380                      break;
     381            case 953:
     382                      tr_bencDictAddReal( &settings, TR_PREFS_KEY_RATIO, atof(optarg) );
     383                      tr_bencDictAddBool( &settings, TR_PREFS_KEY_RATIO_ENABLED, TRUE );
     384                      break;
     385            case 954:
     386                      tr_bencDictAddBool( &settings, TR_PREFS_KEY_RATIO_ENABLED, FALSE );
     387                      break;
    362388            default:  showUsage( );
    363389                      break;
  • trunk/daemon/transmission-daemon.1

    r9122 r10132  
    6161.It Fl et Fl -encryption-tolerated
    6262Prefer unencrypted peer connections.
     63.It Fl gsr Fl -global-seedratio Ar ratio
     64All torrents, unless overridden by a per-torrent setting, should seed until a specific
     65.Ar ratio
     66.It Fl GSR Fl -no-global-seedratio
     67All torrents, unless overridden by a per-torrent setting, should seed regardless of ratio
    6368.It Fl h Fl -help
    6469Print command-line option descriptions.
     70.It Fl -incomplete-dir Ar dir
     71When adding new torrents, store their contents in
     72.Ar directory
     73until the torrent is done.
     74.It Fl -no-incomplete-dir
     75Don't store incomplete torrents in a different directory.
    6576.It Fl i Fl -bind-address-ipv4
    6677Listen for IPv4 BitTorrent connections on a specific address. Only one IPv4 listening address is allowed. Default: 0.0.0.0 (All addresses)
     
    7990.It Fl M Fl -no-portmap
    8091Disable portmapping
     92.It Fl o Fl -dht
     93Enable distributed hash table (DHT).
     94.It Fl O Fl -no-dht
     95Disable distribued hash table (DHT).
    8196.It Fl p Fl -port Ar port
    8297Port to open and listen for RPC requests on.  Default: 9091
Note: See TracChangeset for help on using the changeset viewer.