- Timestamp:
- Feb 10, 2009, 4:22:59 PM (13 years ago)
- Location:
- trunk/daemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/remote.c
r7858 r7865 77 77 { 'M', "no-portmap", "Disable portmapping", "M", 0, NULL }, 78 78 { 'n', "auth", "Set authentication info", "n", 1, "<username:password>" }, 79 { 'N', "netrc", "Set authentication info from a .netrc file", "N", 1, "<filename>" }, 79 80 { 'p', "port", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "p", 1, "<port>" }, 80 81 { 900, "priority-high", "Set the files' priorities as high", "ph", 1, "<files>" }, … … 124 125 static int debug = 0; 125 126 static char * auth = NULL; 127 static char * netrc = NULL; 126 128 127 129 static char* … … 400 402 break; 401 403 404 case 'N': 405 netrc = tr_strdup( optarg ); 406 addArg = FALSE; 407 break; 408 402 409 case 'p': 403 410 tr_bencDictAddStr( &top, "method", "session-set" ); … … 1213 1220 curl_easy_setopt( curl, CURLOPT_ENCODING, "deflate" ); 1214 1221 #endif 1215 curl_easy_setopt( curl, CURLOPT_USERAGENT, 1216 MY_NAME "/" LONG_VERSION_STRING ); 1222 curl_easy_setopt( curl, CURLOPT_USERAGENT, MY_NAME "/" LONG_VERSION_STRING ); 1217 1223 curl_easy_setopt( curl, CURLOPT_WRITEFUNCTION, writeFunc ); 1218 1224 curl_easy_setopt( curl, CURLOPT_WRITEDATA, buf ); 1219 1225 curl_easy_setopt( curl, CURLOPT_POST, 1 ); 1220 1226 curl_easy_setopt( curl, CURLOPT_URL, url ); 1227 curl_easy_setopt( curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL ); 1228 curl_easy_setopt( curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY ); 1229 if( netrc ) 1230 curl_easy_setopt( curl, CURLOPT_NETRC_FILE, netrc ); 1221 1231 if( auth ) 1222 {1223 1232 curl_easy_setopt( curl, CURLOPT_USERPWD, auth ); 1224 curl_easy_setopt( curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY );1225 }1226 1233 1227 1234 for( i = 0; i < reqCount; ++i ) -
trunk/daemon/transmission-remote.1
r7858 r7865 25 25 .Op Fl m | M 26 26 .Op Fl n Ar user:pass 27 .Op Fl N Ar netrc 27 28 .Op Fl p Ar port 28 29 .Op Fl ph Ar files … … 117 118 for authentication 118 119 120 .It Fl N Fl -netrc Ar filename 121 Set the authentication information from a 122 .Ar netrc file. 123 See netrc(5) for more information. 124 119 125 .It Fl p Fl -port Ar port 120 126 Set the
Note: See TracChangeset
for help on using the changeset viewer.