Changeset 210 for trunk/cli/transmissioncli.c
- Timestamp:
- Apr 7, 2006, 12:09:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/transmissioncli.c
r198 r210 42 42 " -p, --port <int> Port we should listen on (default = %d)\n" \ 43 43 " -u, --upload <int> Maximum upload rate (-1 = no limit, default = 20)\n" \ 44 " -d, --download <int> Maximum download rate (-1 = no limit, default = -1)\n" \ 44 45 " -f, --finish <shell script> Command you wish to run on completion\n" 45 46 46 static int showHelp = 0; 47 static int showInfo = 0; 48 static int showScrape = 0; 49 static int verboseLevel = 0; 50 static int bindPort = TR_DEFAULT_PORT; 51 static int uploadLimit = 20; 52 static char * torrentPath = NULL; 53 static volatile char mustDie = 0; 47 static int showHelp = 0; 48 static int showInfo = 0; 49 static int showScrape = 0; 50 static int verboseLevel = 0; 51 static int bindPort = TR_DEFAULT_PORT; 52 static int uploadLimit = 20; 53 static int downloadLimit = -1; 54 static char * torrentPath = NULL; 55 static volatile char mustDie = 0; 54 56 55 57 static char * finishCall = NULL; … … 159 161 tr_setBindPort( h, bindPort ); 160 162 tr_setUploadLimit( h, uploadLimit ); 163 tr_setDownloadLimit( h, downloadLimit ); 161 164 162 165 tr_torrentSetFolder( tor, "." ); … … 241 244 { 242 245 static struct option long_options[] = 243 { { "help", no_argument, NULL, 'h' }, 244 { "info", no_argument, NULL, 'i' }, 245 { "scrape", no_argument, NULL, 's' }, 246 { "verbose", required_argument, NULL, 'v' }, 247 { "port", required_argument, NULL, 'p' }, 248 { "upload", required_argument, NULL, 'u' }, 249 { "finish", required_argument, NULL, 'f' }, 246 { { "help", no_argument, NULL, 'h' }, 247 { "info", no_argument, NULL, 'i' }, 248 { "scrape", no_argument, NULL, 's' }, 249 { "verbose", required_argument, NULL, 'v' }, 250 { "port", required_argument, NULL, 'p' }, 251 { "upload", required_argument, NULL, 'u' }, 252 { "download", required_argument, NULL, 'd' }, 253 { "finish", required_argument, NULL, 'f' }, 250 254 { 0, 0, 0, 0} }; 251 255 252 256 int c, optind = 0; 253 c = getopt_long( argc, argv, "hisv:p:u: f:", long_options, &optind );257 c = getopt_long( argc, argv, "hisv:p:u:d:f:", long_options, &optind ); 254 258 if( c < 0 ) 255 259 { … … 275 279 case 'u': 276 280 uploadLimit = atoi( optarg ); 281 break; 282 case 'd': 283 downloadLimit = atoi( optarg ); 277 284 break; 278 285 case 'f':
Note: See TracChangeset
for help on using the changeset viewer.