[BusyBox-cvs] busybox/util-linux rdate.c,1.30,1.31

Glenn McGrath bug1 at busybox.net
Sat Dec 20 01:47:20 UTC 2003

Update of /var/cvs/busybox/util-linux
In directory nail:/tmp/cvs-serv1871/util-linux

Modified Files:
Log Message:
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.

Index: rdate.c
RCS file: /var/cvs/busybox/util-linux/rdate.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- rdate.c	19 Dec 2003 11:29:29 -0000	1.30
+++ rdate.c	20 Dec 2003 01:47:18 -0000	1.31
@@ -50,7 +50,8 @@
 	struct sockaddr_in s_in;
 	int fd;
-	bb_lookup_host(&s_in, host, "time");
+	bb_lookup_host(&s_in, host);
+	s_in.sin_port = bb_lookup_port("time", 37);
 	/* Add a timeout for dead or non accessable servers */

More information about the busybox-cvs mailing list