diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-03-01 09:12:15 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-03-01 09:12:15 +0000 |
commit | 5ba5fdb3544904896d39646f323395738b002103 (patch) | |
tree | cbdd9c5d2c20e78b91bfaa7a6690a74db0b45213 /libc | |
parent | 5cbc6a7ae1b85577c1f99f6e1175e58a7b3af4d3 (diff) |
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().
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/resolv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 8c985ba33..fee539c39 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -185,6 +185,7 @@ extern int __decode_answer(unsigned char * message, int offset, 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 @@ int res_init(void) { struct __res_state *rp = &(_res); + __close_nameservers(); __open_nameservers(); rp->retrans = RES_TIMEOUT; rp->retry = 4; |