Re: [libvirt-glib] Add async variant of gvir_domain_get_info()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 19, 2012 at 11:52 AM, Christophe Fergeau
<cfergeau@xxxxxxxxxx> wrote:
> On Thu, Apr 19, 2012 at 03:12:01AM +0300, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
>> +static void
>> +gvir_domain_get_info_helper(GSimpleAsyncResult *res,
>> +                            GObject *object,
>> +                            GCancellable *cancellable G_GNUC_UNUSED)
>> +{
>> +    GVirDomain *dom = GVIR_DOMAIN(object);
>> +    GVirDomainInfo *info;
>> +    GError *err = NULL;
>> +
>> +    info = gvir_domain_get_info(dom, &err);
>> +    if (err)
>> +        g_simple_async_result_take_error(res, err);
>> +    else
>> +        g_simple_async_result_set_op_res_gpointer(res, info, NULL);
>
> Shouldn't the last parameter be gvir_domain_info_free?

No, we give this info to user in the finalize call:

>> +
>> +    if (g_simple_async_result_propagate_error(res, err))
>> +        return NULL;
>> +
>> +    return g_simple_async_result_get_op_res_gpointer(res);
>> +}

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]