[PATCH] Fix introspection issue in gdbus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

Attached is a patch to fix a small issue with introspection when using gdbus 
library.  Basically the introspection data for '/' can never be invalidated, 
which leads to funny results when objects are added & removed from '/' 
hierarchy.

Attached patch should fix the issue.

Regards,
-Denis
From 3cd7a2c3483ceac8950c32d0c96786b15e05946f Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denis.kenzior@xxxxxxxxx>
Date: Wed, 1 Apr 2009 16:56:53 -0500
Subject: [PATCH] Make the parent path invalidateable

---
 gdbus/object.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

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;
 
-- 
1.6.0.6


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux