tracker r1867 - in branches/indexer-split: . src/trackerd
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1867 - in branches/indexer-split: . src/trackerd
- Date: Fri, 4 Jul 2008 15:06:27 +0000 (UTC)
Author: pvanhoof
Date: Fri Jul 4 15:06:27 2008
New Revision: 1867
URL: http://svn.gnome.org/viewvc/tracker?rev=1867&view=rev
Log:
2008-07-04 Philip Van Hoof <pvanhoof gnome org>
* src/trackerd/tracker-daemon.c: Error handling for some DBus Apis
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/trackerd/tracker-daemon.c
Modified: branches/indexer-split/src/trackerd/tracker-daemon.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-daemon.c (original)
+++ branches/indexer-split/src/trackerd/tracker-daemon.c Fri Jul 4 15:06:27 2008
@@ -392,6 +392,7 @@
TrackerDaemonPriv *priv;
guint request_id;
gboolean signal_state_change = FALSE;
+ GError *actual_error = NULL;
/* FIXME: Shouldn't we just make the TrackerConfig module a
* DBus object instead so values can be tweaked in real time
@@ -450,6 +451,11 @@
} else if (strcasecmp (option, "BatteryIndexInitial") == 0) {
tracker_config_set_disable_indexing_on_battery_init (priv->config, !value);
g_message ("Disable initial index sweep on battery set to %d", !value);
+ } else {
+ g_set_error (&actual_error,
+ TRACKER_DBUS_ERROR,
+ 0,
+ "Option does not exist");
}
if (signal_state_change) {
@@ -465,7 +471,12 @@
tracker_config_get_enable_indexing (priv->config));
}
- dbus_g_method_return (context);
+ if (!actual_error) {
+ dbus_g_method_return (context);
+ } else {
+ dbus_g_method_return_error (context, actual_error);
+ g_error_free (actual_error);
+ }
tracker_dbus_request_success (request_id);
}
@@ -479,6 +490,7 @@
{
TrackerDaemonPriv *priv;
guint request_id;
+ GError *actual_error = NULL;
/* FIXME: Shouldn't we just make the TrackerConfig module a
* DBus object instead so values can be tweaked in real time
@@ -506,9 +518,19 @@
} else if (strcasecmp (option, "MaxWords") == 0) {
tracker_config_set_max_words_to_index (priv->config, value);
g_message ("Maxinum number of unique words set to %d", value);
- }
+ } else {
+ g_set_error (&actual_error,
+ TRACKER_DBUS_ERROR,
+ 0,
+ "Option does not exist");
+ }
- dbus_g_method_return (context);
+ if (!actual_error) {
+ dbus_g_method_return (context);
+ } else {
+ dbus_g_method_return_error (context, actual_error);
+ g_error_free (actual_error);
+ }
tracker_dbus_request_success (request_id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]