From: Denis Kenzior Date: Mon, 11 May 2009 16:49:53 +0000 (-0500) Subject: Make the parent path invalidateable X-Git-Tag: 0.17~8 X-Git-Url: http://git.maemo.org/git/?a=commitdiff_plain;h=fc92cf53abd77d9c31ecb39ec836a9adaeea13e3;p=connman Make the parent path invalidateable --- diff --git a/gdbus/object.c b/gdbus/object.c index 2823054..3186921 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -307,7 +307,11 @@ static void invalidate_parent_data(DBusConnection *conn, const char *child_path) if (!slash) goto done; - *slash = '\0'; + if (slash == parent_path && parent_path[1] != '\0') + parent_path[1] = '\0'; + else + *slash = '\0'; + if (!strlen(parent_path)) goto done;