Commit 54d5ba5d authored by Zeeshan Ali's avatar Zeeshan Ali

main: Timeout on 'active' rather than 'in-use'

This patch fixes our ability not to timeout if service is in use by
system components.
parent 996cefd1
......@@ -83,20 +83,21 @@ on_inactivity_timeout (gpointer user_data)
static void
on_in_use_notify (GObject *gobject,
on_active_notify (GObject *gobject,
GParamSpec *pspec,
gpointer user_data)
gboolean in_use;
GClueServiceManager *manager = GCLUE_SERVICE_MANAGER (gobject);
gboolean active;
in_use = gclue_manager_get_in_use (GCLUE_MANAGER (gobject));
active = gclue_service_manager_get_active (manager);
if (inactivity_timeout <= 0)
g_debug ("Service %s in use", in_use? "now" : "not");
g_debug ("Service %s in use", active? "now" : "not");
if (!in_use)
if (!active)
inactivity_timeout_id =
g_timeout_add_seconds (inactivity_timeout,
......@@ -123,8 +124,8 @@ on_bus_acquired (GDBusConnection *connection,
g_signal_connect (manager,
G_CALLBACK (on_in_use_notify),
G_CALLBACK (on_active_notify),
if (inactivity_timeout > 0)
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