[tracker] tracker-writeback: Handle if there's no module for the passed rdf types
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-writeback: Handle if there's no module for the passed rdf types
- Date: Tue, 20 Sep 2011 11:03:34 +0000 (UTC)
commit 159f9732e19837af9bb98c4fb802617d6a2f4a4a
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]