From 1ef27ffe8628407e5ae841403e18567c1fe2de1b Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 14 Jan 2011 16:14:21 +0100 Subject: [PATCH] gdbus: Remove root node 'name' attribute in introspection generate_introspection_xml generates the root 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: and generate_introspection_xml generates for "/foo/bar": Just don't add the 'name' attribute to the root node. The GLib binding for D-Bus does it the same way. --- gdbus/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, "\n", path); + g_string_append_printf(gstr, "\n"); for (list = data->interfaces; list; list = list->next) { struct interface_data *iface = list->data;