diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-01-14 16:14:21 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-01-19 17:25:44 +0100 |
commit | 3daf325deb67715d03b7b6187fb2e68ed4fda56f (patch) | |
tree | 601ccb2dec8dea82c3c5cbb3245632067f9e885b /gdbus | |
parent | 9e9a3f26dea7c1534d418929ca6f7094e1d3ffd8 (diff) | |
download | connman-3daf325deb67715d03b7b6187fb2e68ed4fda56f.tar.gz connman-3daf325deb67715d03b7b6187fb2e68ed4fda56f.tar.bz2 connman-3daf325deb67715d03b7b6187fb2e68ed4fda56f.zip |
gdbus: Remove root node 'name' attribute in introspection
generate_introspection_xml generates the root <node> tags with a
'name' attribute. This seems to be a valid attribute but it is not
consistent with the way the D-Bus daemon generates empty nodes.
For example if we register "/foo/bar", D-Bus daemon will generate for
"/foo" a introspection which looks like this:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<node name="bar"/>
</node>
and generate_introspection_xml generates for "/foo/bar":
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/foo/bar">
</node>
Just don't add the 'name' attribute to the root node. The GLib
binding for D-Bus does it the same way.
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdbus/object.c b/gdbus/object.c index 49006ec3..eaa2e1aa 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -162,7 +162,7 @@ static void generate_introspection_xml(DBusConnection *conn, gstr = g_string_new(DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE); - g_string_append_printf(gstr, "<node name=\"%s\">\n", path); + g_string_append_printf(gstr, "<node>\n"); for (list = data->interfaces; list; list = list->next) { struct interface_data *iface = list->data; |