From 89ad3dbaa258f3c15957d5f69558d070e3c5d9bc Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 23 Aug 2009 20:20:52 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20display=20an=20error=20message?= =?utf8?q?=20if=20getaddrinfo()=20fails=20for=20getting=20the=20IPv6=20add?= =?utf8?q?r=20(Thanks=20Atsutane)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/get_ipv6_addr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/get_ipv6_addr.c b/src/get_ipv6_addr.c index 0f22e29..341b5ba 100644 --- a/src/get_ipv6_addr.c +++ b/src/get_ipv6_addr.c @@ -25,7 +25,9 @@ const char *get_ipv6_addr() { * replace this with any other host which has an AAAA record, but the * K root server is a pretty safe bet. */ if (getaddrinfo("k.root-servers.net", "domain", &hints, &result) != 0) { - perror("getaddrinfo()"); + /* We don’t display the error here because most + * likely, there just is no connectivity. + * Thus, don’t spam the user’s console. */ return "no IPv6"; } -- 2.39.5