[tracker/tracker-0.10] tracker-writeback: Handle if there's no module for the passed rdf types
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] tracker-writeback: Handle if there's no module for the passed rdf types
- Date: Thu, 22 Sep 2011 16:45:07 +0000 (UTC)
commit 1ba78cf96a1c6b21463bca696fa55c35b31d0341
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Sep 20 13:02:50 2011 +0200
tracker-writeback: Handle if there's no module for the passed rdf types
src/tracker-writeback/tracker-writeback.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback.c b/src/tracker-writeback/tracker-writeback.c
index 5433ef4..b64593f 100644
--- a/src/tracker-writeback/tracker-writeback.c
+++ b/src/tracker-writeback/tracker-writeback.c
@@ -504,6 +504,7 @@ handle_method_call_perform_writeback (TrackerController *controller,
GArray *rdf_types_array;
GStrv rdf_types;
gchar *rdf_type = NULL;
+ gboolean handled = FALSE;
priv = controller->priv;
@@ -553,6 +554,7 @@ handle_method_call_perform_writeback (TrackerController *controller,
subject,
module->name);
+ handled = TRUE;
writeback = tracker_writeback_module_create (module);
data = writeback_data_new (controller,
writeback,
@@ -569,6 +571,13 @@ handle_method_call_perform_writeback (TrackerController *controller,
}
}
+ if (!handled) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ "No module for rdf types");
+ }
+
g_free (rdf_types);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]