[PATCH] telit-plugin: ignore QSS when SIM-ME interface is locked

Aleksander Morgado aleksander at aleksander.es
Wed Jul 26 10:20:53 UTC 2017


On Wed, Jul 26, 2017 at 10:36 AM, Carlo Lobrano <c.lobrano at gmail.com> wrote:
>>> +            csim_unlock_complete (self->priv->csim_lock_task);
>> Reset the csim_lock_task pointer here to NULL, please.
>
> Can I do this inside csim_unlock_complete or there is a reason to do it
> outside this function?
>

If you do it inside the function, you should be passing the address of
the GTask pointer, i.e.:
  csim_unlock_complete (GTask **task);
So that you can do *task = NULL; inside the function. That's fine.

Although, maybe, given that the GTask is inside the private structure
of the modem object, it may make more sense if you pass the modem
object directly, and access the private info within the function,
something like:

  static void
  pending_csim_unlock_complete (MMBroadbandModemTelit *self)
  {
      // whatever
      g_task_return_something();
      g_clear_object (&self->priv->csim_lock_task);
  }





-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list