avahi_dns_packet_free(reply);
size = avahi_record_get_estimate_size(r) + AVAHI_DNS_PACKET_HEADER_SIZE;
- if (size > AVAHI_DNS_PACKET_MAX_SIZE)
- size = AVAHI_DNS_PACKET_MAX_SIZE;
+ if (size > AVAHI_DNS_PACKET_SIZE_MAX)
+ size = AVAHI_DNS_PACKET_SIZE_MAX;
if (!(reply = avahi_dns_packet_new_reply(p, size, 0, 1)))
break; /* OOM */
assert(s);
if (!s->legacy_unicast_reflect_slots)
- s->legacy_unicast_reflect_slots = avahi_new0(AvahiLegacyUnicastReflectSlot*, AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS);
+ s->legacy_unicast_reflect_slots = avahi_new0(AvahiLegacyUnicastReflectSlot*, AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX);
- for (n = 0; n < AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS; n++, s->legacy_unicast_reflect_id++) {
- idx = s->legacy_unicast_reflect_id % AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS;
+ for (n = 0; n < AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX; n++, s->legacy_unicast_reflect_id++) {
+ idx = s->legacy_unicast_reflect_id % AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX;
if (!s->legacy_unicast_reflect_slots[idx])
break;
assert(s);
assert(slot);
- idx = slot->id % AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS;
+ idx = slot->id % AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX;
assert(s->legacy_unicast_reflect_slots[idx] == slot);
if (!s->legacy_unicast_reflect_slots)
return;
- for (idx = 0; idx < AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS; idx ++)
+ for (idx = 0; idx < AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX; idx ++)
if (s->legacy_unicast_reflect_slots[idx])
deallocate_slot(s, s->legacy_unicast_reflect_slots[idx]);
if (!s->legacy_unicast_reflect_slots)
return NULL;
- idx = id % AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS;
+ idx = id % AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX;
if (!s->legacy_unicast_reflect_slots[idx] || s->legacy_unicast_reflect_slots[idx]->id != id)
return NULL;
return;
}
-/* avahi_log_debug("new packet recieved on interface '%s.%i'.", i->hardware->name, i->protocol); */
+/* avahi_log_debug("new packet received on interface '%s.%i'.", i->hardware->name, i->protocol); */
port = avahi_port_from_sockaddr(sa);
avahi_address_from_sockaddr(sa, &a);
if (!is_mdns_mcast_address(dest) &&
!avahi_interface_address_on_link(i, &a)) {
- avahi_log_warn("Recivied non-local response on interface '%s.%i'.", i->hardware->name, i->protocol);
+ avahi_log_warn("Received non-local response on interface '%s.%i'.", i->hardware->name, i->protocol);
return;
}
return;
}
-/* avahi_log_debug("new legacy unicast packet recieved on interface '%s.%i'.", i->hardware->name, i->protocol); */
+/* avahi_log_debug("new legacy unicast packet received on interface '%s.%i'.", i->hardware->name, i->protocol); */
avahi_address_from_sockaddr(sa, &a);