-/* $Id$ */
-
/***
This file is part of avahi.
avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ARCOUNT); n > 0; n--) {
AvahiRecord *record;
int cache_flush = 0;
-/* char *txt; */
if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) {
avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
if (!avahi_key_is_pattern(record->key)) {
if (handle_conflict(s, i, record, cache_flush)) {
- if (!from_local_iface)
+ if (!from_local_iface && !avahi_record_is_link_local_address(record))
reflect_response(s, i, record, cache_flush);
avahi_cache_update(i->cache, record, cache_flush, a);
avahi_response_scheduler_incoming(i->response_scheduler, record, cache_flush);
}
/* If the incoming response contained a conflicting record, some
- records have been scheduling for sending. We need to flush them
+ records have been scheduled for sending. We need to flush them
here. */
if (!avahi_record_list_is_empty(s->record_list))
avahi_server_generate_response(s, i, NULL, NULL, 0, 0, 1);
avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ID, slot->id);
}
-static void cleanup_dead(AvahiServer *s) {
- assert(s);
-
- avahi_cleanup_dead_entries(s);
- avahi_browser_cleanup(s);
-}
-
static void mcast_socket_event(AvahiWatch *w, int fd, AvahiWatchEvent events, void *userdata) {
AvahiServer *s = userdata;
AvahiAddress dest, src;
if (iface != AVAHI_IF_UNSPEC)
dispatch_packet(s, p, &src, port, &dest, iface, ttl);
else
- avahi_log_error("Incoming packet recieved on address that isn't local.");
+ avahi_log_error("Incoming packet received on address that isn't local.");
avahi_dns_packet_free(p);
- cleanup_dead(s);
+ avahi_cleanup_dead_entries(s);
}
}
dispatch_legacy_unicast_packet(s, p);
avahi_dns_packet_free(p);
- cleanup_dead(s);
+ avahi_cleanup_dead_entries(s);
}
}