[libvirt] [dbus PATCH 10/15] Implement InterfaceLookupByName method for Connect Interface

Pavel Hrdina phrdina at redhat.com
Tue Jul 10 08:37:35 UTC 2018


On Fri, Jul 06, 2018 at 05:36:50PM -0400, Anya Harter wrote:
> Signed-off-by: Anya Harter <aharter at redhat.com>
> ---
>  data/org.libvirt.Connect.xml |  6 ++++++
>  src/connect.c                | 29 +++++++++++++++++++++++++++++
>  2 files changed, 35 insertions(+)

[...]

> diff --git a/src/connect.c b/src/connect.c
> index 563535c..51a6ba0 100644
> --- a/src/connect.c
> +++ b/src/connect.c
> @@ -827,6 +827,34 @@ virtDBusConnectInterfaceDefineXML(GVariant *inArgs,
>      *outArgs = g_variant_new("(o)", path);
>  }
>  
> +static void
> +virtDBusConnectInterfaceLookupByName(GVariant *inArgs,
> +                                     GUnixFDList *inFDs G_GNUC_UNUSED,
> +                                     const gchar *objectPath G_GNUC_UNUSED,
> +                                     gpointer userData,
> +                                     GVariant **outArgs,
> +                                     GUnixFDList **outFDs G_GNUC_UNUSED,
> +                                     GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    g_autoptr(virInterface) interface = NULL;
> +    g_autofree gchar *path = NULL;
> +    const gchar *name;
> +
> +    g_variant_get(inArgs, "(s)", &name);

The format string needs to be "(&s)", the explanation is in the
following patch.

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/20180710/3751fbce/attachment-0001.sig>


More information about the libvir-list mailing list