From 1665d23538c5ed2128b6063d8445013f085ad234 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 28 Aug 2005 01:31:34 +0000 Subject: [PATCH] * be a little bit more verbose about published IP addresses git-svn-id: file:///home/lennart/svn/public/avahi/trunk@464 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/iface.c | 8 ++++++++ avahi-daemon/main.c | 2 +- avahi-daemon/static-services.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/avahi-core/iface.c b/avahi-core/iface.c index f9c3103..ba232e6 100644 --- a/avahi-core/iface.c +++ b/avahi-core/iface.c @@ -61,6 +61,10 @@ static void update_address_rr(AvahiInterfaceMonitor *m, AvahiInterfaceAddress *a return; if (avahi_s_entry_group_is_empty(a->entry_group)) { + char t[64]; + avahi_address_snprint(t, sizeof(t), &a->address); + + avahi_log_info("Registering new address %s on %s.", t, a->interface->hardware->name); if (avahi_server_add_address(m->server, a->entry_group, a->interface->hardware->index, a->interface->protocol, 0, NULL, &a->address) < 0) { avahi_log_warn(__FILE__": avahi_server_add_address() failed: %s", avahi_strerror(m->server->error)); @@ -76,9 +80,13 @@ static void update_address_rr(AvahiInterfaceMonitor *m, AvahiInterfaceAddress *a /* Clear the entry group */ if (a->entry_group && !avahi_s_entry_group_is_empty(a->entry_group)) { + char t[64]; + avahi_address_snprint(t, sizeof(t), &a->address); if (avahi_s_entry_group_get_state(a->entry_group) == AVAHI_ENTRY_GROUP_REGISTERING) avahi_server_decrease_host_rr_pending(m->server); + + avahi_log_info("Withdrawing address %s on %s.", t, a->interface->hardware->name); avahi_s_entry_group_reset(a->entry_group); } diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 75d01aa..7a3e8a4 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -220,7 +220,7 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void *userda #endif if (state == AVAHI_SERVER_RUNNING) { - avahi_log_info("Server startup complete. Host name is <%s>", avahi_server_get_host_name_fqdn(s)); + avahi_log_info("Server startup complete. Host name is %s.", avahi_server_get_host_name_fqdn(s)); static_service_add_to_server(); remove_dns_server_entry_groups(); diff --git a/avahi-daemon/static-services.c b/avahi-daemon/static-services.c index 09d7b1b..a1ec8d0 100644 --- a/avahi-daemon/static-services.c +++ b/avahi-daemon/static-services.c @@ -585,7 +585,7 @@ static void load_file(char *n) { if (strcmp(g->filename, n) == 0) return; - avahi_log_info("Loading service file %s", n); + avahi_log_info("Loading service file %s.", n); g = static_service_group_new(n); if (static_service_group_load(g) < 0) { -- 2.39.5