X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fprobe-sched.c;h=106bb8135fda21b15bac6aa9744b036f4095e721;hb=9f4f7318fb877f57c0d828ed1a732ca8a5e61310;hp=cc2b2ecf9dc942f59bcc2e5ca58598a15ff0a64a;hpb=854f901f491ccda79aee11edc3d59109cb229d28;p=catta diff --git a/avahi-core/probe-sched.c b/avahi-core/probe-sched.c index cc2b2ec..106bb81 100644 --- a/avahi-core/probe-sched.c +++ b/avahi-core/probe-sched.c @@ -23,6 +23,8 @@ #include #endif +#include + #include #include #include @@ -248,10 +250,7 @@ static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) { avahi_record_get_estimate_size(pj->record) + AVAHI_DNS_PACKET_HEADER_SIZE; - if (size > AVAHI_DNS_PACKET_SIZE_MAX) - size = AVAHI_DNS_PACKET_SIZE_MAX; - - if (!(p = avahi_dns_packet_new_query(size))) + if (!(p = avahi_dns_packet_new_query(size + AVAHI_DNS_PACKET_EXTRA_SIZE))) return; /* OOM */ if (!(k = avahi_key_new(pj->record->key->name, pj->record->key->clazz, AVAHI_DNS_TYPE_ANY))) { @@ -300,7 +299,7 @@ static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) { continue; if (!avahi_dns_packet_append_record(p, pj->record, 0, 0)) { - avahi_log_warn("Bad probe size estimate!"); +/* avahi_log_warn("Bad probe size estimate!"); */ /* Unmark all following jobs */ for (; pj; pj = pj->jobs_next)