[tracker/error-handling: 9/10] libtracker-data: Clear ignored journal error in tracker_db_manager_init



commit 60f0b617eba92219ad06207571309c933f8a1c95
Author: Jürg Billeter <j bitron ch>
Date:   Tue May 17 16:28:48 2011 +0200

    libtracker-data: Clear ignored journal error in tracker_db_manager_init

 src/libtracker-data/tracker-data-manager.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index be14a6c..fb309d6 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3539,10 +3539,15 @@ tracker_data_manager_init (TrackerDBManagerFlags   flags,
 				read_journal = TRUE;
 			}
 			tracker_db_journal_reader_shutdown ();
-		} else if (internal_error && (internal_error->domain != TRACKER_DB_JOURNAL_ERROR ||
-			    internal_error->code != TRACKER_DB_JOURNAL_ERROR_BEGIN_OF_JOURNAL)) {
-			g_propagate_error (error, internal_error);
-			return FALSE;
+		} else if (internal_error) {
+			if (!g_error_matches (internal_error,
+			                      TRACKER_DB_JOURNAL_ERROR,
+			                      TRACKER_DB_JOURNAL_ERROR_BEGIN_OF_JOURNAL)) {
+				g_propagate_error (error, internal_error);
+				return FALSE;
+			} else {
+				g_clear_error (&internal_error);
+			}
 		}
 	}
 



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