summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-01-14 16:14:20 +0100
committerMarcel Holtmann <marcel@holtmann.org>2011-01-19 17:25:44 +0100
commit9e9a3f26dea7c1534d418929ca6f7094e1d3ffd8 (patch)
tree861efd51448f0998a355cf2f6534df60adcf430a /gdbus
parenta1e76ec36320b976e88ddb19c8da6396ee272446 (diff)
downloadconnman-9e9a3f26dea7c1534d418929ca6f7094e1d3ffd8.tar.gz
connman-9e9a3f26dea7c1534d418929ca6f7094e1d3ffd8.tar.bz2
connman-9e9a3f26dea7c1534d418929ca6f7094e1d3ffd8.zip
gdbus: invaldate_parent_data: walk the whole path down
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.
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/object.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index afa904eb..49006ec3 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;