gdbus: Don't try to remove removed sources
PATCH 1/3 gdbus: Don't try to remove removed sources
When we return FALSE from idle handlers, the source is removed. This will be causing warnings in glib 2.40.
See https://bugzilla.gnome.org/show_bug.cgi?id=710724
--- gdbus/object.c | 3 +++ 1 file changed, 3 insertions(+)
gdbus/object.c +3 -0
@@ -1006,6 +1006,8 @@ static gboolean process_changes(gpointer user_data)if (data->removed !=NULL )emit_interfaces_removed (data); + data->process_id =0 ; +return FALSE; }
@@ -1019,6 +1021,7 @@ static void generic_unregister(DBusConnection *connection, void *user_data)if (data->process_id >0 ) {g_source_remove (data->process_id); + data->process_id =0 ;process_changes (data); }
Signature · 1 line
1.8.4.2
Quoted 4 lines · Bastien Nocera
When we return FALSE from idle handlers, the source is removed. This will be causing warnings in glib 2.40.
Note that there's plenty of other places where this should be fixed. I'll leave those up to somebody who doesn't get RSI ;)
Luiz Augusto von Dentz
maintainerHi Bastien,
Quoted 8 lines · Bastien Nocera
Quoted 4 lines · Bastien Nocera
When we return FALSE from idle handlers, the source is removed. This will be causing warnings in glib 2.40.
Note that there's plenty of other places where this should be fixed. I'll leave those up to somebody who doesn't get RSI ;)
Btw, did you really got a problem or was just by looking at the code? process_changes always call remove_pending so perhaps the problem was just in generic_unregister, so the change to process_changes was not really necessary.
Signature · 1 line
Luiz Augusto von Dentz
Quoted 9 lines · Luiz Augusto von Dentz
Hi Bastien,
Quoted 6 lines · Bastien Nocera
Quoted 4 lines · Bastien Nocera
When we return FALSE from idle handlers, the source is removed. This will be causing warnings in glib 2.40.
Quoted 7 lines
Quoted 2 lines
Note that there's plenty of other places where this should be fixed. I'll leave those up to somebody who doesn't get RSI ;)
Btw, did you really got a problem or was just by looking at the code?
process_changesalways callremove_pendingso perhaps the problem was just ingeneric_unregister, so the change toprocess_changeswas not really necessary.
I really had the problem, and the patch fixed it. Resetting the id for idle callbacks and timeouts needs to happen at the end of each callback function, or you might be trying to remove an invalid source ID.
Hi Bastien,
Quoted 7 lines · Bastien Nocera
When we return FALSE from idle handlers, the source is removed. This will be causing warnings in glib 2.40.
See https://bugzilla.gnome.org/show_bug.cgi?id=710724
--- gdbus/object.c | 3 +++ 1 file changed, 3 insertions(+)
This patch has been applied. Thanks.
Johan