From: Daniel Wagner <wagi@monom.org>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
Daniel Wagner <daniel.wagner@bmw-carit.de>
Subject: [PATCH v0 2/2] gdbus: Remove root node 'name' attribute in introspection
Date: Fri, 14 Jan 2011 16:14:21 +0100 [thread overview]
Message-ID: <1295018061-5849-3-git-send-email-wagi@monom.org> (raw)
In-Reply-To: <1295018061-5849-1-git-send-email-wagi@monom.org>
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
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.
---
gdbus/object.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdbus/object.c b/gdbus/object.c
index 49006ec..eaa2e1a 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;
--
1.7.3.4
next prev parent reply other threads:[~2011-01-14 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 15:14 [PATCH v0 0/2] gdbus introspection fixes Daniel Wagner
2011-01-14 15:14 ` [PATCH v0 1/2] gdbus: invaldate_parent_data: walk the whole path down Daniel Wagner
2011-01-14 15:14 ` Daniel Wagner [this message]
2011-01-15 13:05 ` [PATCH v0 0/2] gdbus introspection fixes Jose Antonio Santos Cadenas
2011-01-15 13:31 ` Elvis Pfützenreuter
2011-01-15 14:31 ` Jose Antonio Santos Cadenas
2011-01-15 14:34 ` Luiz Augusto von Dentz
2011-01-19 15:10 ` Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295018061-5849-3-git-send-email-wagi@monom.org \
--to=wagi@monom.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox