dbus/bus driver.c,1.69,1.70

Colin Walters walters at freedesktop.org
Thu Mar 17 09:12:01 PST 2005


Update of /cvs/dbus/dbus/bus
In directory gabe:/tmp/cvs-serv28471/bus

Modified Files:
	driver.c 
Log Message:
2005-03-14  Colin Walters  <walters at verbum.org>

	* bus/driver.c (write_args_for_direction): Use
	_dbus_string_get_const_data to retrieve string;
	_dbus_string_get_const_data_len doesn't actually return
	a NULL-terminated substring.

	* test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
	(main): Change to use org_freedesktop_DBus_request_name
	instead of using g_proxy_begin_call/end_call.


Index: driver.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/driver.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- driver.c	12 Mar 2005 20:07:21 -0000	1.69
+++ driver.c	17 Mar 2005 17:11:59 -0000	1.70
@@ -1117,7 +1117,14 @@
       int start, len;
 
       _dbus_type_reader_get_signature (&typereader, &subsig, &start, &len);
-      if (!_dbus_string_append_printf (xml, "      <arg direction=\"%s\" type=\"%s\"/>\n", in ? "in" : "out", _dbus_string_get_const_data_len (subsig, start, len)))
+      if (!_dbus_string_append_printf (xml, "      <arg direction=\"%s\" type=\"",
+				       in ? "in" : "out"))
+	goto oom;
+      if (!_dbus_string_append_len (xml,
+				    _dbus_string_get_const_data (subsig) + start,
+				    len))
+	goto oom;
+      if (!_dbus_string_append (xml, "\"/>\n"))
 	goto oom;
 
       _dbus_type_reader_next (&typereader);



More information about the dbus-commit mailing list