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 1/2] gdbus: invaldate_parent_data: walk the whole path down
Date: Fri, 14 Jan 2011 16:14:20 +0100 [thread overview]
Message-ID: <1295018061-5849-2-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>
Assume there is only one object registerd at "/". If we add a new
object at "/foo/bar" the introspection of "/" has to be updated. A new
node has to be added at "/".
invalidate_parent_data stops invaldating the whole path because the
boolean return value of dbus_connection_get_object_path_data is used
wrong.
If we get a TRUE just go on down in the path, if FALSE is return
dbus_connection_get_object_path_data has run out of memory.
---
gdbus/object.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdbus/object.c b/gdbus/object.c
index afa904e..49006ec 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -475,12 +475,13 @@ static void invalidate_parent_data(DBusConnection *conn, const char *child_path)
if (!strlen(parent_path))
goto done;
- if (!dbus_connection_get_object_path_data(conn, parent_path,
- (void *) &data)) {
- invalidate_parent_data(conn, parent_path);
+ if (dbus_connection_get_object_path_data(conn, parent_path,
+ (void *) &data) == FALSE) {
goto done;
}
+ invalidate_parent_data(conn, parent_path);
+
if (data == NULL)
goto done;
--
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 ` Daniel Wagner [this message]
2011-01-14 15:14 ` [PATCH v0 2/2] gdbus: Remove root node 'name' attribute in introspection Daniel Wagner
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-2-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