[libvirt] [dbus PATCH v3 18/20] Implement MigrateSetMaxSpeed method for Domain Interface

Pavel Hrdina phrdina at redhat.com
Fri Apr 13 12:35:08 UTC 2018


On Fri, Apr 13, 2018 at 01:15:29PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou at redhat.com>
> ---
>  data/org.libvirt.Domain.xml |  6 ++++++
>  src/domain.c                | 25 +++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)

[...]

> +static void
> +virtDBusDomainMigrateSetMaxSpeed(GVariant *inArgs,
> +                                 GUnixFDList *inFDs G_GNUC_UNUSED,
> +                                 const gchar *objectPath,
> +                                 gpointer userData,
> +                                 GVariant **outArgs G_GNUC_UNUSED,
> +                                 GUnixFDList **outFDs G_GNUC_UNUSED,
> +                                 GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    g_autoptr(virDomain) domain = NULL;
> +    gulong bandwidth;
> +    guint flags;
> +
> +    g_variant_get(inArgs, "(tu)", &bandwidth, &flags);
> +
> +    domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
> +    if (!domain)
> +        return;
> +
> +    if (virDomainMigrateSetMaxSpeed(domain, bandwidth, flags) < 0)
> +        return virtDBusUtilSetLastVirtError(error);

Here you missed removing 'return'.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180413/a69b6cee/attachment-0001.sig>


More information about the libvir-list mailing list