From 156bb80befc5e3d2b004005a7e218a2bbc3c0d17 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 8 Mar 2022 20:53:38 +0100 Subject: [PATCH] glib-aux: fix priority for nm_g_idle_add_source() nm_g_idle_add_source() is supposed to work like g_idle_add(). Use the correct priority. I think this causes little actual problems, because usually we don't carefully tune the priorities and would be mostly fine with either. Fixes: 6b18fc252d1e ('shared: add nm_g_{idle,timeout}_add_source() helpers') (cherry picked from commit 15e88379452e231d1821c0d7f8e4df89ccd86e8b) --- src/libnm-glib-aux/nm-shared-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h index 6e1ad658eb..a953140b84 100644 --- a/src/libnm-glib-aux/nm-shared-utils.h +++ b/src/libnm-glib-aux/nm-shared-utils.h @@ -1789,7 +1789,7 @@ nm_g_idle_add_source(GSourceFunc func, gpointer user_data) /* A convenience function to attach a new timeout source to the default GMainContext. * In that sense it's very similar to g_idle_add() except that it returns a * reference to the new source. */ - return nm_g_source_attach(nm_g_idle_source_new(G_PRIORITY_DEFAULT, func, user_data, NULL), + return nm_g_source_attach(nm_g_idle_source_new(G_PRIORITY_DEFAULT_IDLE, func, user_data, NULL), NULL); }