[tracker] libtracker-data: Do not share anonymous blank nodes between graphs



commit f951b1333bfbc2cf21a1caa0ed9803558eb712e9
Author: Jürg Billeter <j bitron ch>
Date:   Tue Mar 15 16:16:39 2011 +0100

    libtracker-data: Do not share anonymous blank nodes between graphs
    
    Fixes NB#236387.

 src/libtracker-data/tracker-data-update.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 9aab5a5..3b8f645 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -1090,6 +1090,10 @@ tracker_data_blank_buffer_flush (GError **error)
 	/* generate hash uri from data to find resource
 	   assumes no collisions due to generally little contents of anonymous nodes */
 	for (i = 0; i < blank_buffer.predicates->len; i++) {
+		if (blank_buffer.graphs->data[i] != NULL) {
+			g_checksum_update (checksum, g_array_index (blank_buffer.graphs, guchar *, i), -1);
+		}
+
 		g_checksum_update (checksum, g_array_index (blank_buffer.predicates, guchar *, i), -1);
 		g_checksum_update (checksum, g_array_index (blank_buffer.objects, guchar *, i), -1);
 	}



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