[tracker/direct-wait: 4/6] libtracker-data: Fix journal reader with rotated journals
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-wait: 4/6] libtracker-data: Fix journal reader with rotated journals
- Date: Tue, 24 Aug 2010 10:23:44 +0000 (UTC)
commit 1e4596b9a4a8d91ab5c231b51b7333916353763c
Author: Jürg Billeter <j bitron ch>
Date: Tue Aug 24 12:01:08 2010 +0200
libtracker-data: Fix journal reader with rotated journals
src/libtracker-data/tracker-db-journal.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-journal.c b/src/libtracker-data/tracker-db-journal.c
index 29059d6..3a0db95 100644
--- a/src/libtracker-data/tracker-db-journal.c
+++ b/src/libtracker-data/tracker-db-journal.c
@@ -1327,10 +1327,17 @@ db_journal_reader_next (JournalReader *jreader, gboolean global_reader, GError *
if (journal_eof (jreader)) {
/* Return FALSE as there is no further entry but
* do not set error as it's not an error case. */
- if (global_reader && jreader->current_file != 0)
- return reader_next_file (error);
- else
+ if (global_reader && jreader->current_file != 0) {
+ if (reader_next_file (error)) {
+ /* read first entry in next file */
+ return db_journal_reader_next (jreader, global_reader, error);
+ } else {
+ /* no more files */
+ return FALSE;
+ }
+ } else {
return FALSE;
+ }
}
jreader->entry_begin = jreader->current;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]