From 0632e854728e8e64552ae08f90852d4a2658539e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 5 Aug 2005 18:59:21 +0000 Subject: * add proper error codes and patch everything to make use of it * parameter validity checkin in all user visible functions of libavahi-core * two new python tools/examples avahi-resolve-host-name and avahi-resolve-address git-svn-id: file:///home/lennart/svn/public/avahi/trunk@238 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'avahi-daemon/main.c') diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 1083416..99bf860 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -150,6 +150,7 @@ static AvahiEntryGroup* add_dns_servers(AvahiServer *s, AvahiEntryGroup* g, gcha else if (avahi_server_add_dns_server_address(s, g, -1, AF_UNSPEC, NULL, AVAHI_DNS_SERVER_RESOLVE, &a, 53) < 0) { avahi_entry_group_free(g); + avahi_log_error("Failed to add DNS server address: %s", avahi_strerror(avahi_server_errno(s))); return NULL; } } @@ -500,6 +501,7 @@ static gint run_server(DaemonConfig *c) { gint r = -1; GIOChannel *io = NULL; guint watch_id = (guint) -1; + gint error; g_assert(c); @@ -527,8 +529,10 @@ static gint run_server(DaemonConfig *c) { goto finish; #endif - if (!(avahi_server = avahi_server_new(NULL, &c->server_config, server_callback, c))) + if (!(avahi_server = avahi_server_new(NULL, &c->server_config, server_callback, c, &error))) { + avahi_log_error("Failed to create server: %s", avahi_strerror(error)); goto finish; + } load_resolv_conf(c); -- cgit