]> git.meshlink.io Git - catta/commitdiff
remove yet another occurence of dbus_message_iter_get_array_len() due to obsolescence...
authorLennart Poettering <lennart@poettering.net>
Sun, 31 Dec 2006 17:19:30 +0000 (17:19 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 31 Dec 2006 17:19:30 +0000 (17:19 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1360 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-client/resolver.c

index 2d9f8088b0d15aaf799cd6f69d754cf01df57c30..4403a12713cabc33b9c07519b40b76ae1a7861d6 100644 (file)
@@ -106,6 +106,8 @@ DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolv
             for (;;) {
                 DBusMessageIter sub2;
                 int at;
+                const uint8_t *k;
+                int n;
             
                 if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
                     break;
@@ -119,13 +121,10 @@ DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolv
             
                 dbus_message_iter_recurse(&sub, &sub2);
 
-                if (dbus_message_iter_get_array_len(&sub2) > 0) {
-                    uint8_t *k;
-                    int n;
-                
-                    dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+                k = NULL; n = 0;
+                dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+                if (k && n > 0)
                     strlst = avahi_string_list_add_arbitrary(strlst, k, n);
-                }
             
                 dbus_message_iter_next(&sub);
             }