[at-spi2-atk] Avoid calling a deprecated libdbus function
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk] Avoid calling a deprecated libdbus function
- Date: Mon, 3 Jan 2011 17:03:09 +0000 (UTC)
commit 98fa500555aaef2ada618a9e55bf97243d28247e
Author: Mike Gorse <mgorse novell com>
Date: Thu Dec 30 05:24:32 2010 -0500
Avoid calling a deprecated libdbus function
atk-adaptor/bridge.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 42ec92c..6a2ba15 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -227,10 +227,7 @@ get_registered_event_listeners (SpiBridge *app)
}
dbus_message_iter_init (reply, &iter);
dbus_message_iter_recurse (&iter, &iter_array);
- /* TODO: This is bad. Need to determine that the array is non-empty,
- so that we don't initially read a value rom it in that case, but using
- a deprecated function. */
- if (dbus_message_iter_get_array_len (&iter_array) > 0) do
+ while (dbus_message_iter_get_arg_type (&iter_array) != DBUS_TYPE_INVALID)
{
char *bus_name, *event;
dbus_message_iter_recurse (&iter_array, &iter_struct);
@@ -238,8 +235,8 @@ get_registered_event_listeners (SpiBridge *app)
dbus_message_iter_next (&iter_struct);
dbus_message_iter_get_basic (&iter_struct, &event);
add_event (bus_name, event);
+ dbus_message_iter_next (&iter_array);
}
- while (dbus_message_iter_next (&iter_array));
dbus_message_unref (reply);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]