* [PATCH 1/3] gdbus: Don't try to remove removed sources
@ 2013-11-09 17:02 Bastien Nocera
2013-11-09 17:04 ` Bastien Nocera
2013-11-11 8:39 ` Johan Hedberg
0 siblings, 2 replies; 5+ messages in thread
From: Bastien Nocera @ 2013-11-09 17:02 UTC (permalink / raw)
To: linux-bluetooth
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(+)
diff --git a/gdbus/object.c b/gdbus/object.c
index 268fed5..b248cbb 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -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);
}
--
1.8.4.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] gdbus: Don't try to remove removed sources
2013-11-09 17:02 [PATCH 1/3] gdbus: Don't try to remove removed sources Bastien Nocera
@ 2013-11-09 17:04 ` Bastien Nocera
2013-11-11 9:32 ` Luiz Augusto von Dentz
2013-11-11 8:39 ` Johan Hedberg
1 sibling, 1 reply; 5+ messages in thread
From: Bastien Nocera @ 2013-11-09 17:04 UTC (permalink / raw)
To: linux-bluetooth
On Sat, 2013-11-09 at 18:02 +0100, Bastien Nocera wrote:
> 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
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 ;)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] gdbus: Don't try to remove removed sources
2013-11-09 17:02 [PATCH 1/3] gdbus: Don't try to remove removed sources Bastien Nocera
2013-11-09 17:04 ` Bastien Nocera
@ 2013-11-11 8:39 ` Johan Hedberg
1 sibling, 0 replies; 5+ messages in thread
From: Johan Hedberg @ 2013-11-11 8:39 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-bluetooth
Hi Bastien,
On Sat, Nov 09, 2013, Bastien Nocera wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] gdbus: Don't try to remove removed sources
2013-11-09 17:04 ` Bastien Nocera
@ 2013-11-11 9:32 ` Luiz Augusto von Dentz
2013-11-11 12:13 ` Bastien Nocera
0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2013-11-11 9:32 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-bluetooth@vger.kernel.org
Hi Bastien,
On Sat, Nov 9, 2013 at 7:04 PM, Bastien Nocera <hadess@hadess.net> wrote:
> On Sat, 2013-11-09 at 18:02 +0100, Bastien Nocera wrote:
>> 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
>
> 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.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] gdbus: Don't try to remove removed sources
2013-11-11 9:32 ` Luiz Augusto von Dentz
@ 2013-11-11 12:13 ` Bastien Nocera
0 siblings, 0 replies; 5+ messages in thread
From: Bastien Nocera @ 2013-11-11 12:13 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth@vger.kernel.org
On Mon, 2013-11-11 at 11:32 +0200, Luiz Augusto von Dentz wrote:
> Hi Bastien,
>
> On Sat, Nov 9, 2013 at 7:04 PM, Bastien Nocera <hadess@hadess.net> wrote:
> > On Sat, 2013-11-09 at 18:02 +0100, Bastien Nocera wrote:
> >> 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
> >
> > 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.
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-11 12:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-09 17:02 [PATCH 1/3] gdbus: Don't try to remove removed sources Bastien Nocera
2013-11-09 17:04 ` Bastien Nocera
2013-11-11 9:32 ` Luiz Augusto von Dentz
2013-11-11 12:13 ` Bastien Nocera
2013-11-11 8:39 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox