[glib] gmain: mark newest id used when source id overflows
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gmain: mark newest id used when source id overflows
- Date: Sun, 13 Oct 2013 14:26:22 +0000 (UTC)
commit c4c3ee6087d36603b29a8a1201c7171d2f99c0b1
Author: Noah Massey <gnome walterwelp net>
Date: Sun Oct 13 10:25:39 2013 -0400
gmain: mark newest id used when source id overflows
When the source id reaches G_MAXUINT (just prior to overflow), we
record the existing source ids to prevent reassigning them. As we are
about to assign G_MAXUINT to the triggering source, that id should be
added as well.
https://bugzilla.gnome.org/show_bug.cgi?id=710002
glib/gmain.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 99de6a8..a66739e 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -1083,6 +1083,7 @@ assign_source_id_unlocked (GMainContext *context,
GUINT_TO_POINTER (source->source_id));
}
id = G_MAXUINT;
+ g_hash_table_add (context->overflow_used_source_ids, GUINT_TO_POINTER (id));
}
else if (context->overflow_used_source_ids == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]