diff options
author | tedu <> | 2005-03-30 02:58:28 +0000 |
---|---|---|
committer | tedu <> | 2005-03-30 02:58:28 +0000 |
commit | 3b040f7dfaf37c407ea6ede1c8c2092e6bf903fd (patch) | |
tree | a8ff98cee0b13b3b8eeae1624d717e734dc22bb7 /src/lib/libc/net/getaddrinfo.c | |
parent | cc22824e6cee4353df96b7aeec5d080789306136 (diff) | |
download | openbsd-3b040f7dfaf37c407ea6ede1c8c2092e6bf903fd.tar.gz openbsd-3b040f7dfaf37c407ea6ede1c8c2092e6bf903fd.tar.bz2 openbsd-3b040f7dfaf37c407ea6ede1c8c2092e6bf903fd.zip |
make the resolver stat resolv.conf and update if it changes.
useful feedback and ok deraadt@
Diffstat (limited to 'src/lib/libc/net/getaddrinfo.c')
-rw-r--r-- | src/lib/libc/net/getaddrinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/net/getaddrinfo.c b/src/lib/libc/net/getaddrinfo.c index c7cc0500c3..19967e8432 100644 --- a/src/lib/libc/net/getaddrinfo.c +++ b/src/lib/libc/net/getaddrinfo.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getaddrinfo.c,v 1.51 2005/03/25 13:24:12 otto Exp $ */ | 1 | /* $OpenBSD: getaddrinfo.c,v 1.52 2005/03/30 02:58:28 tedu Exp $ */ |
2 | /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ | 2 | /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ |
3 | 3 | ||
4 | /* | 4 | /* |
@@ -516,7 +516,7 @@ explore_fqdn(const struct addrinfo *pai, const char *hostname, | |||
516 | return 0; | 516 | return 0; |
517 | } | 517 | } |
518 | 518 | ||
519 | if ((_resp->options & RES_INIT) == 0 && res_init() == -1) | 519 | if (_res_init(0) == -1) |
520 | strlcpy(lookups, "f", sizeof lookups); | 520 | strlcpy(lookups, "f", sizeof lookups); |
521 | else { | 521 | else { |
522 | bcopy(_resp->lookups, lookups, sizeof lookups); | 522 | bcopy(_resp->lookups, lookups, sizeof lookups); |
@@ -1525,7 +1525,7 @@ res_queryN(const char *name, struct res_target *target) | |||
1525 | rcode = NOERROR; | 1525 | rcode = NOERROR; |
1526 | ancount = 0; | 1526 | ancount = 0; |
1527 | 1527 | ||
1528 | if ((_resp->options & RES_INIT) == 0 && res_init() == -1) { | 1528 | if (_res_init(0) == -1) { |
1529 | h_errno = NETDB_INTERNAL; | 1529 | h_errno = NETDB_INTERNAL; |
1530 | free(buf); | 1530 | free(buf); |
1531 | return (-1); | 1531 | return (-1); |
@@ -1631,7 +1631,7 @@ res_searchN(const char *name, struct res_target *target) | |||
1631 | int trailing_dot, ret, saved_herrno; | 1631 | int trailing_dot, ret, saved_herrno; |
1632 | int got_nodata = 0, got_servfail = 0, tried_as_is = 0; | 1632 | int got_nodata = 0, got_servfail = 0, tried_as_is = 0; |
1633 | 1633 | ||
1634 | if ((_resp->options & RES_INIT) == 0 && res_init() == -1) { | 1634 | if (_res_init(0) == -1) { |
1635 | h_errno = NETDB_INTERNAL; | 1635 | h_errno = NETDB_INTERNAL; |
1636 | return (-1); | 1636 | return (-1); |
1637 | } | 1637 | } |
@@ -1768,7 +1768,7 @@ res_querydomainN(const char *name, const char *domain, | |||
1768 | const char *longname = nbuf; | 1768 | const char *longname = nbuf; |
1769 | size_t n, d; | 1769 | size_t n, d; |
1770 | 1770 | ||
1771 | if ((_resp->options & RES_INIT) == 0 && res_init() == -1) { | 1771 | if (_res_init(0) == -1) { |
1772 | h_errno = NETDB_INTERNAL; | 1772 | h_errno = NETDB_INTERNAL; |
1773 | return (-1); | 1773 | return (-1); |
1774 | } | 1774 | } |