src/collectd.c: Write a more informative error message if looking up the FQDN fails.
authorFlorian Forster <octo@huhu.verplant.org>
Tue, 19 Feb 2008 13:00:22 +0000 (14:00 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 19 Feb 2008 13:00:22 +0000 (14:00 +0100)
As requested by Micha Krause.

src/collectd.c

index 2d161aa..f260c84 100644 (file)
@@ -87,7 +87,11 @@ static int init_hostname (void)
        status = getaddrinfo (hostname_g, NULL, &ai_hints, &ai_list);
        if (status != 0)
        {
-               ERROR ("getaddrinfo failed.");
+               ERROR ("Looking up \"%s\" failed. You have set the "
+                               "\"FQDNLookup\" option, but I cannot resolve "
+                               "my hostname to a fully qualified domain "
+                               "name. Please fix you network "
+                               "configuration.");
                return (-1);
        }