dbus/glib dbus-gobject.c,1.7,1.8

Olivier Andrieu oandrieu at pdx.freedesktop.org
Sat Jun 5 09:32:02 PDT 2004


Update of /cvs/dbus/dbus/glib
In directory pdx:/tmp/cvs-serv10912/glib

Modified Files:
	dbus-gobject.c 
Log Message:
2004-06-05  Olivier Andrieu  <oliv__a at users.sourceforge.net>

	* 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.


Index: dbus-gobject.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gobject.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/dbus-gobject.c	1 Jun 2004 03:02:26 -0000	1.7
+++ b/dbus-gobject.c	5 Jun 2004 16:32:00 -0000	1.8
@@ -280,13 +280,10 @@
   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 @@
 
   g_string_free (xml, TRUE);
 
-  dbus_free_string_array (path);
   dbus_free_string_array (children);
   
   return DBUS_HANDLER_RESULT_HANDLED;
@@ -548,22 +544,16 @@
                                    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)
    */




More information about the dbus-commit mailing list