Changeset 3578 for trunk/daemon/remote.c
- Timestamp:
- Oct 26, 2007, 3:43:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/remote.c
r3401 r3578 73 73 char dir[MAXPATHLEN]; 74 74 int pex; 75 const char * crypto; 75 76 }; 76 77 … … 175 176 ( '\0' != o.dir[0] && 0 > client_dir ( o.dir ) ) || 176 177 ( !SLIST_EMPTY( &o.files ) && 0 > client_addfiles ( &o.files ) ) || 178 ( o.crypto && 0 > client_crypto ( o.crypto ) ) || 177 179 ( o.startall && 0 > client_start ( 0, NULL ) ) || 178 180 ( o.stopall && 0 > client_stop ( 0, NULL ) ) || … … 230 232 "\n" 231 233 " -a --add <torrent> Add a torrent\n" 234 " -c --encryption preferred Prefer peers to use encryption\n" 235 " -c --encryption required Require encryption for all peers\n" 232 236 " -d --download-limit <int> Max download rate in KiB/s\n" 233 237 " -D --download-unlimited No download rate limit\n" … … 261 265 readargs( int argc, char ** argv, struct opts * opts ) 262 266 { 263 char optstr[] = "a: d:DeEf:hilmMp:qr:s:S:t:u:Ux";267 char optstr[] = "a:c:d:DeEf:hilmMp:qr:s:S:t:u:Ux"; 264 268 struct option longopts[] = 265 269 { 266 270 { "add", required_argument, NULL, 'a' }, 271 { "encryption", required_argument, NULL, 'c' }, 267 272 { "download-limit", required_argument, NULL, 'd' }, 268 273 { "download-unlimited", no_argument, NULL, 'D' }, … … 307 312 return -1; 308 313 } 314 break; 315 case 'c': 316 if(!strcasecmp(optarg, "preferred")) 317 opts->crypto = "preferred"; 318 else if(!strcasecmp(optarg, "required")) 319 opts->crypto = "required"; 320 else 321 usage("invalid encryption mode: %s", optarg); 309 322 break; 310 323 case 'd':
Note: See TracChangeset
for help on using the changeset viewer.