From a66c19d9111dc950aac47b7becaddf1b0814f251 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 31 Dec 2006 17:19:30 +0000 Subject: [PATCH] remove yet another occurence of dbus_message_iter_get_array_len() due to obsolescence (similar in style to r1357) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1360 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-client/resolver.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/avahi-client/resolver.c b/avahi-client/resolver.c index 2d9f808..4403a12 100644 --- a/avahi-client/resolver.c +++ b/avahi-client/resolver.c @@ -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); } -- 2.39.5