summaryrefslogtreecommitdiffstats
path: root/avahi-core/iface.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-05-16 01:01:43 +0000
committerLennart Poettering <lennart@poettering.net>2005-05-16 01:01:43 +0000
commitf5a4db2039532ef93fbb3d98fa048be9d74a83fe (patch)
treeb3db891f27468f13ed2851f3f69e843823780dbc /avahi-core/iface.c
parenta3596a5e3ec4937a220e6e60218639e2aba82701 (diff)
* case insensitive name comparisons
* corectly handle RRsets * make addresses unique * return to probe state on conflict * a bunch of fixes detected while testing against the Apple Bonjour Conformance Test * a fix in avahi_record_lexicographical_cmp() regarding TXT records * API for choosing alternative host and service names * remove a bunch of unused crap from cache.c and server.c * flush cache when an interface becomes unavailable git-svn-id: file:///home/lennart/svn/public/avahi/trunk@72 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/iface.c')
-rw-r--r--avahi-core/iface.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/avahi-core/iface.c b/avahi-core/iface.c
index 23507f2..7f51305 100644
--- a/avahi-core/iface.c
+++ b/avahi-core/iface.c
@@ -49,7 +49,7 @@ static void update_address_rr(AvahiInterfaceMonitor *m, AvahiInterfaceAddress *a
} else {
if (!a->entry_group) {
a->entry_group = avahi_entry_group_new(m->server, NULL, NULL);
- avahi_server_add_address(m->server, a->entry_group, a->interface->hardware->index, AF_UNSPEC, 0, NULL, &a->address);
+ avahi_server_add_address(m->server, a->entry_group, a->interface->hardware->index, AF_UNSPEC, 0, NULL, &a->address);
avahi_entry_group_commit(a->entry_group);
}
}
@@ -202,13 +202,14 @@ static void check_interface_relevant(AvahiInterfaceMonitor *m, AvahiInterface *i
} else if (!b && i->announcing) {
g_message("Interface %s.%i no longer relevant", i->hardware->name, i->protocol);
- avahi_goodbye_interface(m->server, i, FALSE);
-
if (i->protocol == AF_INET)
avahi_mdns_mcast_leave_ipv4 (i->hardware->index, m->server->fd_ipv4);
if (i->protocol == AF_INET6)
avahi_mdns_mcast_leave_ipv6 (i->hardware->index, m->server->fd_ipv6);
+ avahi_goodbye_interface(m->server, i, FALSE);
+ avahi_cache_flush(i->cache);
+
i->announcing = FALSE;
}
}
@@ -510,12 +511,12 @@ gboolean avahi_interface_post_query(AvahiInterface *i, AvahiKey *key, gboolean i
return FALSE;
}
-gboolean avahi_interface_post_response(AvahiInterface *i, AvahiRecord *record, gboolean flush_cache, gboolean immediately) {
+gboolean avahi_interface_post_response(AvahiInterface *i, AvahiRecord *record, gboolean flush_cache, gboolean immediately, const AvahiAddress *querier) {
g_assert(i);
g_assert(record);
if (avahi_interface_relevant(i))
- return avahi_packet_scheduler_post_response(i->scheduler, record, flush_cache, immediately);
+ return avahi_packet_scheduler_post_response(i->scheduler, record, flush_cache, immediately, querier);
return FALSE;
}