]> git.meshlink.io Git - catta/blobdiff - avahi-core/probe-sched.c
l10n: Updated Italian (it) translation to 100%
[catta] / avahi-core / probe-sched.c
index cc2b2ecf9dc942f59bcc2e5ca58598a15ff0a64a..106bb8135fda21b15bac6aa9744b036f4095e721 100644 (file)
@@ -23,6 +23,8 @@
 #include <config.h>
 #endif
 
+#include <stdlib.h>
+
 #include <avahi-common/domain.h>
 #include <avahi-common/timeval.h>
 #include <avahi-common/malloc.h>
@@ -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)