summaryrefslogtreecommitdiff
path: root/gdbus/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbus/object.c')
-rw-r--r--gdbus/object.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index a2201016c..afb458764 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -635,11 +635,19 @@ static gboolean g_dbus_args_have_signature(const GDBusArgInfo *args,
static void add_pending(struct generic_data *data)
{
- if (data->process_id > 0)
- return;
+ guint old_id = data->process_id;
data->process_id = g_idle_add(process_changes, data);
+ if (old_id > 0) {
+ /*
+ * If the element already had an old idler, remove the old one,
+ * no need to re-add it to the pending list.
+ */
+ g_source_remove(old_id);
+ return;
+ }
+
pending = g_slist_append(pending, data);
}