summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-05 18:59:21 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-05 18:59:21 +0000
commit0632e854728e8e64552ae08f90852d4a2658539e (patch)
tree0fab7d52e01da7ab9b81b8409dcf70cceb7d2852 /avahi-daemon/main.c
parentd76069e946b4e89c828c96340677e40f583080c9 (diff)
* 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
Diffstat (limited to 'avahi-daemon/main.c')
-rw-r--r--avahi-daemon/main.c6
1 files changed, 5 insertions, 1 deletions
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);