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

Erik Andersen andersen at busybox.net
Sun Jan 18 18:18:35 UTC 2004


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

Modified Files:
	rdate.c 
Log Message:
Stephane Billiart writes:

bb_lookup_port now takes 3 parameters but rdate has not been modified
accordingly and fails to compile in the current CVS version.
The modification below fixes the problem.

Now, RFC868 allows both UDP and TCP implementations of the time protocol
so this may not work if someone defines a udp time service other than 37
but who would do that?



Index: rdate.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/rdate.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- rdate.c	20 Dec 2003 01:47:18 -0000	1.31
+++ rdate.c	18 Jan 2004 18:18:33 -0000	1.32
@@ -51,7 +51,7 @@
 	int fd;
 
 	bb_lookup_host(&s_in, host);
-	s_in.sin_port = bb_lookup_port("time", 37);
+	s_in.sin_port = bb_lookup_port("time", "tcp", 37);
 
 	/* Add a timeout for dead or non accessable servers */
 	alarm(10);




More information about the busybox-cvs mailing list