From: Daniel Wagner Date: Fri, 14 Jan 2011 15:14:20 +0000 (+0100) Subject: gdbus: invaldate_parent_data: walk the whole path down X-Git-Tag: 2.0_alpha~1861 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e9a3f26dea7c1534d418929ca6f7094e1d3ffd8;p=framework%2Fconnectivity%2Fconnman.git 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. --- 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;