[tracker/binary-log-2: 27/46] libtracker-db: Fix end of transaction handling when reading journal
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/binary-log-2: 27/46] libtracker-db: Fix end of transaction handling when reading journal
- Date: Mon, 11 Jan 2010 17:20:33 +0000 (UTC)
commit 38f946d7b7f0ac45bbf349d620d0aaa34127b881
Author: Jürg Billeter <j bitron ch>
Date: Wed Jan 6 15:06:23 2010 +0100
libtracker-db: Fix end of transaction handling when reading journal
src/libtracker-db/tracker-db-journal.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index 16288ed..490f849 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -727,11 +727,12 @@ tracker_db_journal_reader_next (GError **error)
} else if (reader.amount_of_triples == 0) {
/* end of transaction */
- if (reader.current + 4 != reader.entry_end) {
+ reader.current += 4;
+ if (reader.current != reader.entry_end) {
/* damaged journal entry */
g_set_error (error, TRACKER_DB_JOURNAL_ERROR, 0,
"Damaged journal entry, %p != %p (end of transaction with 0 triples)",
- reader.current + 4,
+ reader.current,
reader.entry_end);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]