summaryrefslogtreecommitdiffstats
path: root/bus/driver.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2005-03-17 17:11:59 +0000
committerColin Walters <walters@verbum.org>2005-03-17 17:11:59 +0000
commit6180ae6941aea083f5b8f3c4d3f16c928935bcaf (patch)
treef1aa9dc8922e42fe29defca2bc2ae2c059ca2239 /bus/driver.c
parentbcdd18548392c46ea33dc5e15da8c8c82414a486 (diff)
2005-03-14 Colin Walters <walters@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.
Diffstat (limited to 'bus/driver.c')
-rw-r--r--bus/driver.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bus/driver.c b/bus/driver.c
index 8f627787..2a58d807 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -1117,7 +1117,14 @@ write_args_for_direction (DBusString *xml,
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);