summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-06-05 21:57:53 (GMT)
committerColin Walters <walters@verbum.org>2008-06-05 21:57:53 (GMT)
commitd1b80d803a0268bd4b3dd5b9a9522230461f2947 (patch)
tree64f4c5e9664294eb2f4e19df37f74027d7f35722
parent8054025ae498cc586676fd0ed6573828dd0de4a0 (diff)
downloaddbus-glib-d1b80d803a0268bd4b3dd5b9a9522230461f2947.tar.gz
dbus-glib-d1b80d803a0268bd4b3dd5b9a9522230461f2947.tar.xz
Bug 16114 [patch] wincaps-to-uscore property names for GetAll()
* dbus/dbus-gobject.c: We need to uscore property names so that we actually find the right properties.
-rw-r--r--dbus/dbus-gobject.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c
index 3744d84..ee76011 100644
--- a/dbus/dbus-gobject.c
+++ b/dbus/dbus-gobject.c
@@ -775,6 +775,7 @@ get_all_object_properties (DBusConnection *connection,
DBusMessageIter iter_dict_entry;
DBusMessageIter iter_dict_value;
const char *p;
+ char *uscore_propname;
ret = dbus_message_new_method_return (message);
if (ret == NULL)
@@ -815,13 +816,18 @@ get_all_object_properties (DBusConnection *connection,
p++;
p++;
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), prop_name);
+ uscore_propname = _dbus_gutils_wincaps_to_uscore (prop_name);
+
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), uscore_propname);
if (pspec == NULL)
{
- g_warning ("introspection data references non-existing property %s", prop_name);
+ g_warning ("introspection data references non-existing property %s", uscore_propname);
+ g_free (uscore_propname);
continue;
}
+ g_free (uscore_propname);
+
g_value_init (&value, pspec->value_type);
g_object_get_property (object, pspec->name, &value);