Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
This commit is contained in:
parent
b03be7f567
commit
036dbaa082
8 changed files with 22 additions and 31 deletions
|
@ -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 $
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue