From 89ad3dbaa258f3c15957d5f69558d070e3c5d9bc Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 23 Aug 2009 20:20:52 +0200 Subject: Don’t display an error message if getaddrinfo() fails for getting the IPv6 addr (Thanks Atsutane) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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"; } -- cgit v1.2.3