]> git.meshlink.io Git - catta/blobdiff - avahi-core/wide-area.c
Add missing INTLTOOL_DESKTOP_RULE
[catta] / avahi-core / wide-area.c
index d86e5482a8e371c51ded74faa1bac80fae55c83c..add81c7e920efb67e81f38fd61bc4881f9e2deb6 100644 (file)
@@ -515,7 +515,7 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) {
         AvahiKey *k;
         
         if (!(k = avahi_dns_packet_consume_key(p, NULL))) {
-            avahi_log_warn(__FILE__": Wide area response packet too short.");
+            avahi_log_warn(__FILE__": Wide area response packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
             avahi_server_set_errno(e->server, AVAHI_ERR_INVALID_PACKET);
             final_event = AVAHI_BROWSER_FAILURE;
             goto finish;
@@ -532,7 +532,7 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) {
         AvahiRecord *rr;
 
         if (!(rr = avahi_dns_packet_consume_record(p, NULL))) {
-            avahi_log_warn(__FILE__": Wide area response packet too short (2).");
+            avahi_log_warn(__FILE__": Wide area response packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
             avahi_server_set_errno(e->server, AVAHI_ERR_INVALID_PACKET);
             final_event = AVAHI_BROWSER_FAILURE;
             goto finish;
@@ -579,8 +579,8 @@ AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s) {
     e->cleanup_dead = 0;
 
     /* Create sockets */
-    e->fd_ipv4 = avahi_open_unicast_socket_ipv4();
-    e->fd_ipv6 = avahi_open_unicast_socket_ipv6();
+    e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
+    e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
 
     if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) {
         avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno));