summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2021-03-25 17:16:20 +0100
committerBenjamin Berg <bberg@redhat.com>2021-03-25 17:16:20 +0100
commit9fdd1fe31acdf711f32100831b3349e142a14b6d (patch)
treede2ad4a6df029fb55e7ad9efbee5df45e11325b3
parentad9a9c6ea311011fb1dadddec3c940e2c24a2615 (diff)
downloadgdm-benzea/fix-idle-cb-return.tar.gz
display-factory: Correctly return from idle callbackbenzea/fix-idle-cb-return
The idle callback was defined as a void function rather than returning a boolean as it should. This meant that the return value may end up being non-zero in some situations causing an infinite loop. This seems to only happen on aarch64 and possibly only with certain compiler versions. Closes: #668
-rw-r--r--daemon/gdm-display-factory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/gdm-display-factory.c b/daemon/gdm-display-factory.c
index 1214f7f5..b28d287c 100644
--- a/daemon/gdm-display-factory.c
+++ b/daemon/gdm-display-factory.c
@@ -76,7 +76,7 @@ purge_display (char *id,
}
}
-static void
+static gboolean
purge_displays (GdmDisplayFactory *factory)
{
GdmDisplayFactoryPrivate *priv;
@@ -86,6 +86,8 @@ purge_displays (GdmDisplayFactory *factory)
gdm_display_store_foreach_remove (priv->display_store,
(GdmDisplayStoreFunc)purge_display,
NULL);
+
+ return G_SOURCE_REMOVE;
}
void