On Mon, Jul 17, 2017 at 10:02 AM, Aleksander Morgado
<aleksan...@aleksander.es> wrote:
>> What you included here as a
>> snippet is a huge bug actually.
> Well, not that huge really... the only issue is that we're setting the
> GSimpleAsyncResult result twice to TRUE. But, of course, if the
> parent's implementation isn't using a GSimpleAsyncResult and is using
> a GTask instead (as in your case), there really would be a bug as a
> GTask isn't a GSimpleAsyncResult :) So, let me fix as many of those
> issues as I find in a quick look, and then publish your full branch
> and we'll get it reviewed and merged.

I did the following grep in the source code to find all places where
we were casting explicitly to G_SIMPLE_ASYNC_RESULT when calling

  $ grep -r "g_simple_async_result_set_op" . | grep "G_SIMPLE_ASYNC"

And fixed all places reported.

The rationale is that we usually explicitly use the GSimpleAsyncResult
type instead of "gpointer" in the user_data passed to the async
functions inside the async function we're implementing, so there
usually is never the need to explicitly cast that to
GSimpleAsyncResult again to call g_simple_async_result_set_op...().
Where there was an explicit cast, the code was buggy.

Please rebase your branch on top of master, include the missing
commits you took out, and repush for review.

ModemManager-devel mailing list

Reply via email to