[tracker/binary-log-2: 19/48] Add the four bytes of the last entry_size to entry_size



commit c3cb2a8ebc5acaee9c802fc3b0edab4d2caa57b3
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Jan 6 11:12:46 2010 +0100

    Add the four bytes of the last entry_size to entry_size

 src/libtracker-db/tracker-db-journal.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index 88d9ab6..d331fb0 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -478,13 +478,13 @@ tracker_db_journal_commit_transaction (void)
 
 	cur_block_maybe_expand (size);
 
+	writer.cur_block_len += size;
+
 	cur_setnum (writer.cur_block, &begin_pos, writer.cur_block_len);
 	cur_setnum (writer.cur_block, &begin_pos, writer.cur_entry_amount);
 
 	cur_setnum (writer.cur_block, &writer.cur_pos, writer.cur_block_len);
 
-	writer.cur_block_len += size;
-
 	/* CRC is calculated from entries until appended amount int */
 
 	crc = tracker_crc32 (writer.cur_block + offset, writer.cur_block_len - offset);



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