[packages] net/wput: Make the package working (#4158)
[openwrt/svn-archive/archive.git] / net / wput / patches / 102-wput.diff
1 --- a/src/wput.c
2 +++ b/src/wput.c
3 @@ -582,8 +582,8 @@ void commandlineoptions(int argc, char *
4 {"output-file", 1, 0, 'o'},
5 {"port-mode", 0, 0, 'p'},
6 {"proxy", 1, 0, 'Y'},
7 - {"proxy-user", 1, 0, 0},
8 - {"proxy-pass", 1, 0, 0}, //20
9 + {"proxy_user", 1, 0, 0},
10 + {"proxy_pass", 1, 0, 0}, //20
11 {"quiet", 0, 0, 'q'},
12 {"random-wait", 0, 0, 0},
13 {"remove-source-files", 0, 0, 'R'},
14 @@ -601,7 +601,9 @@ void commandlineoptions(int argc, char *
15 {"version", 0, 0, 'V'}, //35
16 {"wait", 1, 0, 'w'},
17 {"waitretry", 1, 0, 0},
18 - {0, 0, 0, 0}
19 + {"proxy_host", 1, 0, 0},
20 + {"proxy_port", 1, 0, 0},
21 + {0, 0, 0, 0}
22 };
23 while (1)
24 {
25 @@ -656,6 +658,10 @@ void commandlineoptions(int argc, char *
26 opt.basename = optarg; break;
27 case 37: //waitretry
28 opt.retry_interval = atoi(optarg); break;
29 + case 38: //proxy_host
30 + set_option("proxy_host", optarg); break;
31 + case 39: //proxy_port
32 + set_option("proxy_port", optarg); break;
33 default:
34 fprintf(stderr, _("Option %s should not appear here :|\n"), long_options[option_index].name);
35 }
36 @@ -762,8 +768,11 @@ void commandlineoptions(int argc, char *
37 " -l, --limit-rate=RATE limit upload rate to RATE\n"
38 " -nd, --no-directories do not create any directories\n"
39 " -Y, --proxy=http/socks/off set proxy type or turn off\n"
40 -" --proxy-user=NAME set the proxy-username to NAME\n"
41 -" --proxy-pass=PASS set the proxy-password to PASS\n"
42 +" --proxy_user=NAME set the proxy-username to NAME\n"
43 +" --proxy_pass=PASS set the proxy-password to PASS\n"
44 +" --proxy_port=PORT set the proxy port to PORT\n"
45 +" --proxy_host=HOST set the proxy host to HOST\n"
46 +
47 "\n"));
48 fprintf(stderr, _(
49 "FTP-Options:\n"