From 96f6740f2fbc16c7ee220d3d5abdc94e22da78f3 Mon Sep 17 00:00:00 2001 From: Olivier Andrieu Date: Sat, 5 Jun 2004 16:32:00 +0000 Subject: 2004-06-05 Olivier Andrieu * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path registration functions take the path argument as char* instead of char**. * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path): split off the path decompostion part of _dbus_demarshal_object_path. Some misc. fixes to silence compiler warnings. * glib/dbus-gobject.c, test/test-service.c: update accordingly. --- glib/dbus-gobject.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'glib') diff --git a/glib/dbus-gobject.c b/glib/dbus-gobject.c index 0168697e..80f766c5 100644 --- a/glib/dbus-gobject.c +++ b/glib/dbus-gobject.c @@ -280,13 +280,10 @@ handle_introspect (DBusConnection *connection, GString *xml; unsigned int i; DBusMessage *ret; - char **path; char **children; - if (!dbus_message_get_path_decomposed (message, &path)) - g_error ("Out of memory"); - - if (!dbus_connection_list_registered (connection, (const char**) path, + if (!dbus_connection_list_registered (connection, + dbus_message_get_path (message), &children)) g_error ("Out of memory"); @@ -318,7 +315,6 @@ handle_introspect (DBusConnection *connection, g_string_free (xml, TRUE); - dbus_free_string_array (path); dbus_free_string_array (children); return DBUS_HANDLER_RESULT_HANDLED; @@ -548,22 +544,16 @@ dbus_connection_register_g_object (DBusConnection *connection, const char *at_path, GObject *object) { - char **split; - g_return_if_fail (connection != NULL); g_return_if_fail (at_path != NULL); g_return_if_fail (G_IS_OBJECT (object)); - split = _dbus_gutils_split_path (at_path); - if (!dbus_connection_register_object_path (connection, - (const char**) split, + at_path, &gobject_dbus_vtable, object)) g_error ("Failed to register GObject with DBusConnection"); - g_strfreev (split); - /* FIXME set up memory management (so we break the * registration if object or connection vanishes) */ -- cgit