mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-04-17 15:00:44 +02:00
daemon: more efficient poll resetting
If the poll timeout is actually changed because the warning level has changed, only reset the actual poll code, not the warning level notifications and the booking structures. https://bugs.freedesktop.org/show_bug.cgi?id=99862
This commit is contained in:
parent
7171ce38d6
commit
e4b85ef5df
1 changed files with 2 additions and 2 deletions
|
|
@ -777,9 +777,9 @@ change_idle_timeout (UpDevice *device,
|
|||
g_debug ("Resetting for polling for '%s' (warning-level change)",
|
||||
up_device_get_object_path (device));
|
||||
|
||||
g_source_remove (data->id);
|
||||
data->timeout = timeout;
|
||||
up_daemon_stop_poll (G_OBJECT (device));
|
||||
up_daemon_start_poll (G_OBJECT (device), callback);
|
||||
enable_poll_for_device (device, data);
|
||||
}
|
||||
|
||||
g_object_unref (daemon);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue