Commit 55a80bac authored by Zeeshan Ali's avatar Zeeshan Ali

service-client: Don't stop sys components on max accuracy = 0

We automatically stop all clients if agent sets the max accuracy to 0
but system components should be an exception here.
parent 0ca452b5
......@@ -232,11 +232,13 @@ on_agent_props_changed (GDBusProxy *agent_proxy,
g_variant_get (changed_properties, "a{sv}", &iter);
while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) {
GClueAccuracyLevel max_accuracy;
GClueConfig *config;
const char *id;
if (strcmp (key, "MaxAccuracyLevel") != 0)
config = gclue_config_get_singleton ();
id = gclue_client_get_desktop_id (GCLUE_CLIENT (client));
max_accuracy = g_variant_get_uint32 (value);
/* FIXME: We should be handling all values of max accuracy
......@@ -253,7 +255,8 @@ on_agent_props_changed (GDBusProxy *agent_proxy,
start_client (client, accuracy);
g_debug ("Re-started '%s'.", id);
} else if (max_accuracy == 0 &&
gclue_client_get_active (GCLUE_CLIENT (client))) {
gclue_client_get_active (GCLUE_CLIENT (client)) &&
!gclue_config_is_system_component (config, id)) {
stop_client (client);
client->priv->agent_stopped = TRUE;
g_debug ("Stopped '%s'.", id);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment