From c933faf61396cf9c9779a65e25aac5c0101140b1 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 6 Mar 2009 11:55:30 +0100 Subject: [PATCH] Call res_init in case of failure to resolv names --- src/priv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/priv.c b/src/priv.c index 21f4bf99..e087cca4 100644 --- a/src/priv.c +++ b/src/priv.c @@ -39,6 +39,9 @@ #include #include #include +#include +#include +#include enum { PRIV_PING, @@ -235,7 +238,8 @@ asroot_gethostbyname() if (uname(&un) != 0) fatal("[priv]: failed to get system information"); if ((hp = gethostbyname(un.nodename)) == NULL) { - LLOG_WARN("[priv]: unable to get system name"); + LLOG_INFO("[priv]: unable to get system name"); + res_init(); len = strlen(un.nodename); must_write(remote, &len, sizeof(int)); must_write(remote, un.nodename, len + 1); -- 2.47.2