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

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

 



On Fri, Apr 13, 2018 at 01:15:12PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: PGP signature

--
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]

  Powered by Linux