From 036dbaa082f1974246d1d7d21a8e163559642485 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Sat, 17 Jan 2004 05:03:31 +0000 Subject: Modify bb_lookup_port to allow the protocol to be specified, allowing /etc/services support for inetd, netcat and tftp. --- networking/wget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'networking/wget.c') 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) char *cp, *sp, *up, *pp; if (strncmp(url, "http://", 7) == 0) { - h->port = bb_lookup_port("http", 80); + h->port = bb_lookup_port("http", "tcp", 80); h->host = url + 7; h->is_ftp = 0; } else if (strncmp(url, "ftp://", 6) == 0) { - h->port = bb_lookup_port("ftp", 21); + h->port = bb_lookup_port("ftp", "tfp", 21); h->host = url + 6; h->is_ftp = 1; } else @@ -834,7 +834,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.64 2003/12/27 00:21:47 bug1 Exp $ + * $Id: wget.c,v 1.65 2004/01/17 05:03:31 bug1 Exp $ */ -- cgit v1.2.3-55-g6feb