summaryrefslogtreecommitdiffstats
path: root/avahi-core/server.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-24 23:56:34 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-24 23:56:34 +0000
commit3073103812f0ea376582eb0ff1479945a847b361 (patch)
treee9b7fbc96b6866747ef7b856afa863b88e409a65 /avahi-core/server.c
parent5c0f7327451ba44f43aaaf28816c7ed172128ccc (diff)
* rename all limit defs so that they end with _MAX
* fix some minor typos git-svn-id: file:///home/lennart/svn/public/avahi/trunk@863 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/server.c')
-rw-r--r--avahi-core/server.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/avahi-core/server.c b/avahi-core/server.c
index fe5b45f..3edd96e 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -409,8 +409,8 @@ void avahi_server_generate_response(AvahiServer *s, AvahiInterface *i, AvahiDnsP
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 */
@@ -652,10 +652,10 @@ static AvahiLegacyUnicastReflectSlot* allocate_slot(AvahiServer *s) {
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;
@@ -680,7 +680,7 @@ static void deallocate_slot(AvahiServer *s, AvahiLegacyUnicastReflectSlot *slot)
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);
@@ -697,7 +697,7 @@ static void free_slots(AvahiServer *s) {
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]);
@@ -713,7 +713,7 @@ static AvahiLegacyUnicastReflectSlot* find_slot(AvahiServer *s, uint16_t id) {
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;
@@ -862,7 +862,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const struct sock
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);
@@ -923,7 +923,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const struct sock
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;
}
@@ -955,7 +955,7 @@ static void dispatch_legacy_unicast_packet(AvahiServer *s, AvahiDnsPacket *p, co
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);