[PATCH 2/2] port-qmi: port mm_port_qmi_allocate_client to use GTask

Aleksander Morgado aleksander at aleksander.es
Sat Apr 8 10:37:33 UTC 2017


On 07/04/17 18:25, Ben Chan wrote:
>>>  typedef struct {
>>> -    MMPortQmi *self;
>>> -    GSimpleAsyncResult *result;
>>>      ServiceInfo *info;
>>>  } AllocateClientContext;
>>>
>> I believe we could remove the AllocateClientContext struct all together
>> and just pass the ServiceInfo as task data, right?
> That was my first attempt, but then I realized that
> g_task_set_task_data would free any existing data it holds. As
> indicated below, the ServiceInfo may be transferred to the internal
> list.
> 

Ah true, true. We could avoid that making the ServiceInfo refcounted,
but probably not worth it.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list