[tracker] libtracker-data: abort if getting max ID fails
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: abort if getting max ID fails
- Date: Mon, 12 Jul 2010 15:21:30 +0000 (UTC)
commit 290522899cf08b03aac10a64a1ebb352f0fe23ec
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Jul 12 17:20:15 2010 +0200
libtracker-data: abort if getting max ID fails
src/libtracker-data/tracker-data-manager.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 34699f3..3e9faf2 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -2233,14 +2233,14 @@ get_new_service_id (TrackerDBInterface *iface)
}
if (cursor) {
- tracker_db_cursor_iter_next (cursor, &error);
- max_service_id = tracker_db_cursor_get_int (cursor, 0);
+ if (tracker_db_cursor_iter_next (cursor, &error)) {
+ max_service_id = tracker_db_cursor_get_int (cursor, 0);
+ }
g_object_unref (cursor);
}
if (error) {
- g_warning ("%s", error->message);
- g_error_free (error);
+ g_error ("Unable to get max ID, aborting: %s", error->message);
}
return ++max_service_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]