diff options
| author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-20 01:47:18 +0000 |
|---|---|---|
| committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-20 01:47:18 +0000 |
| commit | dd797e19af7a7c3ee42c6fc37a4d09c883cf6b67 (patch) | |
| tree | 859f5849c30de6cb69bf6336af6d2228402f2395 /util-linux | |
| parent | 2c55d72493d14416986fa7eee6b66ee034de0658 (diff) | |
| download | busybox-w32-dd797e19af7a7c3ee42c6fc37a4d09c883cf6b67.tar.gz busybox-w32-dd797e19af7a7c3ee42c6fc37a4d09c883cf6b67.tar.bz2 busybox-w32-dd797e19af7a7c3ee42c6fc37a4d09c883cf6b67.zip | |
Change interface to bb_lookup_host, dont try and set port inside this
function as there is no gracefull way of handling failures.
Rename bb_getport to bb_lookup_port, allow a default port to be
specified so it always returns a correct value.
Modify ftpgetput/rdate/wget to use the new interface.
wget/rdate now use etc/services with a falback default value.
git-svn-id: svn://busybox.net/trunk/busybox@8140 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/rdate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index 0b5f8e460..a317cda55 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
| @@ -50,7 +50,8 @@ static time_t askremotedate(const char *host) | |||
| 50 | struct sockaddr_in s_in; | 50 | struct sockaddr_in s_in; |
| 51 | int fd; | 51 | int fd; |
| 52 | 52 | ||
| 53 | bb_lookup_host(&s_in, host, "time"); | 53 | bb_lookup_host(&s_in, host); |
| 54 | s_in.sin_port = bb_lookup_port("time", 37); | ||
| 54 | 55 | ||
| 55 | /* Add a timeout for dead or non accessable servers */ | 56 | /* Add a timeout for dead or non accessable servers */ |
| 56 | alarm(10); | 57 | alarm(10); |
