<div dir="ltr">That's right, thank you<br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 26 Jul 2017 at 12:21 Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jul 26, 2017 at 10:36 AM, Carlo Lobrano <<a href="mailto:c.lobrano@gmail.com" target="_blank">c.lobrano@gmail.com</a>> wrote:<br>
>>> +            csim_unlock_complete (self->priv->csim_lock_task);<br>
>> Reset the csim_lock_task pointer here to NULL, please.<br>
><br>
> Can I do this inside csim_unlock_complete or there is a reason to do it<br>
> outside this function?<br>
><br>
<br>
If you do it inside the function, you should be passing the address of<br>
the GTask pointer, i.e.:<br>
  csim_unlock_complete (GTask **task);<br>
So that you can do *task = NULL; inside the function. That's fine.<br>
<br>
Although, maybe, given that the GTask is inside the private structure<br>
of the modem object, it may make more sense if you pass the modem<br>
object directly, and access the private info within the function,<br>
something like:<br>
<br>
  static void<br>
  pending_csim_unlock_complete (MMBroadbandModemTelit *self)<br>
  {<br>
      // whatever<br>
      g_task_return_something();<br>
      g_clear_object (&self->priv->csim_lock_task);<br>
  }<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div>