]> git.meshlink.io Git - catta/commitdiff
* handle AVAHI_LOOKUP_NO_ADDRESS over DBUS correctly
authorLennart Poettering <lennart@poettering.net>
Thu, 13 Oct 2005 14:29:13 +0000 (14:29 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 13 Oct 2005 14:29:13 +0000 (14:29 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@755 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-client/resolver.c
avahi-daemon/dbus-protocol.c

index 889088f3a2b772ecf771443d2ed0230f4054e131..c548f0196204f06336e583899d3bdddfb84d8cdb 100644 (file)
@@ -144,6 +144,9 @@ DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolv
                 fprintf(stderr, "Failed to parse address\n");
                 goto fail;
             }
+
+            if (address[0] == 0)
+                address = NULL;
     
             r->callback(r, (AvahiIfIndex) interface, (AvahiProtocol) protocol, AVAHI_RESOLVER_FOUND, name, type, domain, host, &a, port, strlst, (AvahiLookupResultFlags) flags, r->userdata);
         
index 25a9e8ebb96321e77f636788205cd7c36c49441e..bec97cda61e379a640e6826ad17b68f8f578a1c7 100644 (file)
@@ -1558,8 +1558,10 @@ static void async_service_resolver_callback(
 
 /*         avahi_log_debug(__FILE__": [%s] Successfully resolved service <%s.%s.%s>", i->path, name, type, domain); */
         
-        assert(a);
-        avahi_address_snprint(t, sizeof(t), a);
+        if (a)
+            avahi_address_snprint(t, sizeof(t), a);
+        else
+            t[0] = 0;
 
         if (!name)
             name = "";