[uClibc-cvs] uClibc/libc/inet resolv.c,1.44,1.45

Erik Andersen andersen at codepoet.org
Sat Mar 1 09:12:18 UTC 2003


Update of /var/cvs/uClibc/libc/inet
In directory winder:/tmp/cvs-serv10056/libc/inet

Modified Files:
	resolv.c 
Log Message:
Patch from Jeffrey Damick:

With glibc if you do a res_init() that forces a reread of the nameservers file,
but in uClibc the res_init will not force a reread if it has already read the
file because then the nameservers value is greater than 0.

So res_init must call close_nameservers() before calling open_nameservers().



Index: resolv.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/resolv.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- resolv.c	12 Feb 2003 12:45:11 -0000	1.44
+++ resolv.c	1 Mar 2003 09:12:15 -0000	1.45
@@ -185,6 +185,7 @@
 	struct resolv_answer * a);
 extern int __length_question(unsigned char * message, int offset);
 extern int __open_nameservers(void);
+extern void __close_nameservers(void);
 
 
 #ifdef L_encodeh
@@ -968,6 +969,7 @@
 {
 	struct __res_state *rp = &(_res);
 
+	__close_nameservers();
 	__open_nameservers();
 	rp->retrans = RES_TIMEOUT;
 	rp->retry = 4;




More information about the uClibc-cvs mailing list