diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-17 05:03:31 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-17 05:03:31 +0000 |
commit | 036dbaa082f1974246d1d7d21a8e163559642485 (patch) | |
tree | 2488441544ab16f8e08d0955d323019e96ed3d4f /networking/wget.c | |
parent | b03be7f5677b86acfe2f64b5a57e1f361e257f6c (diff) | |
download | busybox-w32-036dbaa082f1974246d1d7d21a8e163559642485.tar.gz busybox-w32-036dbaa082f1974246d1d7d21a8e163559642485.tar.bz2 busybox-w32-036dbaa082f1974246d1d7d21a8e163559642485.zip |
Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
Diffstat (limited to 'networking/wget.c')
-rw-r--r-- | networking/wget.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/wget.c b/networking/wget.c index 8bed7369f..c92771e18 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -537,11 +537,11 @@ void parse_url(char *url, struct host_info *h) | |||
537 | char *cp, *sp, *up, *pp; | 537 | char *cp, *sp, *up, *pp; |
538 | 538 | ||
539 | if (strncmp(url, "http://", 7) == 0) { | 539 | if (strncmp(url, "http://", 7) == 0) { |
540 | h->port = bb_lookup_port("http", 80); | 540 | h->port = bb_lookup_port("http", "tcp", 80); |
541 | h->host = url + 7; | 541 | h->host = url + 7; |
542 | h->is_ftp = 0; | 542 | h->is_ftp = 0; |
543 | } else if (strncmp(url, "ftp://", 6) == 0) { | 543 | } else if (strncmp(url, "ftp://", 6) == 0) { |
544 | h->port = bb_lookup_port("ftp", 21); | 544 | h->port = bb_lookup_port("ftp", "tfp", 21); |
545 | h->host = url + 6; | 545 | h->host = url + 6; |
546 | h->is_ftp = 1; | 546 | h->is_ftp = 1; |
547 | } else | 547 | } else |
@@ -834,7 +834,7 @@ progressmeter(int flag) | |||
834 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 834 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
835 | * SUCH DAMAGE. | 835 | * SUCH DAMAGE. |
836 | * | 836 | * |
837 | * $Id: wget.c,v 1.64 2003/12/27 00:21:47 bug1 Exp $ | 837 | * $Id: wget.c,v 1.65 2004/01/17 05:03:31 bug1 Exp $ |
838 | */ | 838 | */ |
839 | 839 | ||
840 | 840 | ||