On Wed, Jul 09, 2014 at 06:23:25PM +0200, Timm Bäder wrote:
> ---
> libvirt-gobject/libvirt-gobject-domain.c | 61
> ++++++++++++++++++++++++++++++++
> libvirt-gobject/libvirt-gobject-domain.h | 10 ++++++
> libvirt-gobject/libvirt-gobject.sym | 2 ++
> 3 files changed, 73 insertions(+)
>
> diff --git a/libvirt-gobject/libvirt-gobject-domain.c
> b/libvirt-gobject/libvirt-gobject-domain.c
> index 8f48c2e..7fd5043 100644
> --- a/libvirt-gobject/libvirt-gobject-domain.c
> +++ b/libvirt-gobject/libvirt-gobject-domain.c
> @@ -1621,3 +1621,64 @@ GList *gvir_domain_get_snapshots(GVirDomain *dom)
>
> return snapshots;
> }
> +
> +
> +
> +static void _fetch_snapshots_async_thread(GTask *task,
> + gpointer source_object,
> + gpointer task_data,
> + GCancellable *cancellable) {
> + GError *error = NULL;
> + gboolean status;
> +
> + status = gvir_domain_fetch_snapshots(source_object,
> + GPOINTER_TO_UINT(task_data),
> + cancellable,
> + &error);
> + if (status)
> + g_task_return_boolean(task, TRUE);
> + else
> + g_task_return_error(task, error);This is using GTask without updating the configure.ac glib version check to 2.36. I assume when you use this, valgrind don't complain after you added the g_object_unref(task) in gvir_domain_fetch_snapshots_async? Looks good otherwise, Christophe
pgpnoaxpg9NpX.pgp
Description: PGP signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
