[libvirt] [dbus PATCH v3 01/20] Implement Setter for Autostart property for Domain interface

Pavel Hrdina phrdina at redhat.com
Fri Apr 13 11:29:59 UTC 2018


On Fri, Apr 13, 2018 at 01:15:12PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou at redhat.com>
> ---
>  data/org.libvirt.Domain.xml |  5 +++--
>  src/domain.c                | 22 +++++++++++++++++++++-
>  test/test_domain.py         |  7 +++++++
>  3 files changed, 31 insertions(+), 3 deletions(-)

[...]

> +static void
> +virtDBusDomainSetAutostart(GVariant *value,
> +                           const gchar *objectPath,
> +                           gpointer userData,
> +                           GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    g_autoptr(virDomain) domain = NULL;
> +    gboolean autostart;
> +
> +    g_variant_get(value, "b", &autostart);
> +
> +    domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
> +    if (!domain)
> +        return;
> +
> +    if (virDomainSetAutostart(domain, autostart) < 0)
> +        return virtDBusUtilSetLastVirtError(error);

You missed one '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/43cb4c5d/attachment-0001.sig>


More information about the libvir-list mailing list