diff options
author | Thomas Haller <thaller@redhat.com> | 2023-05-05 09:09:39 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-06-14 12:04:24 +0200 |
commit | e8f78419b8b0fba0601b64a1bcf880b9663bc3d2 (patch) | |
tree | 16aab92423f385abd9fcf4ddaae9d4205527967f | |
parent | 10b27393227460adb47c0450b5ebe973096049db (diff) |
fixup! core: rework nm_policy_device_recheck_auto_activate_all_schedule()th/rework-recheck-auto-activate
-rw-r--r-- | src/core/nm-policy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/nm-policy.c b/src/core/nm-policy.c index 874d4e50e8..792cdb416d 100644 --- a/src/core/nm-policy.c +++ b/src/core/nm-policy.c @@ -2594,6 +2594,12 @@ nm_policy_device_recheck_auto_activate_all_schedule(NMPolicy *self) const CList *tmp_lst; NMDevice *device; + if (nm_clear_g_source_inst(&priv->auto_activate_idle_source)) { + /* reschedule the timer if it was pending already. The idea is that idle + * activation is pushed back further. */ + priv->auto_activate_idle_source = nm_g_idle_add_source(_auto_activate_idle_cb, self); + } + if (priv->auto_activate_recheck_all_blocked) { /* Optimize. Calling nm_policy_device_recheck_auto_activate_all_schedule() several * times should not require to iterate all devices multiple times. |