diff options
| author | Pierre Beyssac <pb@FreeBSD.org> | 2004-04-05 20:18:48 +0000 |
|---|---|---|
| committer | Pierre Beyssac <pb@FreeBSD.org> | 2004-04-05 20:18:48 +0000 |
| commit | e651d83aa30fb3f26e6a2d736c5daf80100b4e32 (patch) | |
| tree | 395d20b9fb09f4d56130b4685ec5e4ece2221187 | |
| parent | cf497adabf4fa9b371bd1d72ca48b97d65d2757e (diff) | |
Notes
| -rw-r--r-- | lib/libc/net/name6.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index 3d42e3c196bc..1337598a30fe 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -1565,7 +1565,8 @@ _res_search_multi(name, rtl, errp) continue; hp = _hpcopy(&hpbuf, errp); hp0 = _hpmerge(hp0, hp, errp); - } + } else + *errp = h_errno; } if (hp0 != NULL) { free(buf); @@ -1604,7 +1605,8 @@ _res_search_multi(name, rtl, errp) continue; hp = _hpcopy(&hpbuf, errp); hp0 = _hpmerge(hp0, hp, errp); - } + } else + *errp = h_errno; } if (hp0 != NULL) { free(buf); @@ -1677,7 +1679,8 @@ _res_search_multi(name, rtl, errp) continue; hp = _hpcopy(&hpbuf, errp); hp0 = _hpmerge(hp0, hp, errp); - } + } else + *errp = h_errno; } if (hp0 != NULL) { free(buf); @@ -1739,7 +1742,12 @@ _dns_ghbyname(void *rval, void *cb_data, va_list ap) rtl = &rtl4; #endif *(struct hostent **)rval = _res_search_multi(name, rtl, errp); - return (*(struct hostent **)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND; + if (*(struct hostent **)rval != NULL) + return NS_SUCCESS; + else if (*errp == TRY_AGAIN) + return NS_TRYAGAIN; + else + return NS_NOTFOUND; } static int |
