]> git.meshlink.io Git - catta/commitdiff
cleanup of adresss parsing on the client side
authorLennart Poettering <lennart@poettering.net>
Thu, 13 Oct 2005 15:08:31 +0000 (15:08 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 13 Oct 2005 15:08:31 +0000 (15:08 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@758 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-client/resolver.c

index c51a3bec379f066236ca0e6037d5387ce9c8ca8c..37965cef482a78349b667d7c052efd08bf68fc0c 100644 (file)
@@ -140,12 +140,13 @@ DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolv
             dbus_message_iter_get_basic(&iter, &flags);
                                     
             assert(address);
-            avahi_address_parse(address, (AvahiProtocol) aprotocol, &a);
 
             if (address[0] == 0)
                 address = NULL;
+           else
+               avahi_address_parse(address, (AvahiProtocol) aprotocol, &a);
     
-            r->callback(r, (AvahiIfIndex) interface, (AvahiProtocol) protocol, AVAHI_RESOLVER_FOUND, name, type, domain, host, &a, port, strlst, (AvahiLookupResultFlags) flags, r->userdata);
+            r->callback(r, (AvahiIfIndex) interface, (AvahiProtocol) protocol, AVAHI_RESOLVER_FOUND, name, type, domain, host, address ? &a : NULL, port, strlst, (AvahiLookupResultFlags) flags, r->userdata);
         
             avahi_string_list_free(strlst);
             break;