[libvirt] [PATCH 2/2] admin: Remove flags checking from virAdmConnectOpen public API

Peter Krempa pkrempa at redhat.com
Thu May 5 12:13:53 UTC 2016


On Thu, May 05, 2016 at 13:49:24 +0200, Erik Skultety wrote:
> Unlike the previous commit, we do actually support one client-side only flag
> VIR_CONNECT_NO_ALIASES, so besides removing the check for flags this flag
> has to be masked out before sending a message to the daemon, otherwise it
> would trigger an error when checking flags on the daemon side.
> 
> Signed-off-by: Erik Skultety <eskultet at redhat.com>
> ---
>  src/admin/admin_remote.c | 2 +-
>  src/libvirt-admin.c      | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/admin/admin_remote.c b/src/admin/admin_remote.c
> index 40fcddb..180dd3b 100644
> --- a/src/admin/admin_remote.c
> +++ b/src/admin/admin_remote.c
> @@ -162,7 +162,7 @@ remoteAdminConnectOpen(virAdmConnectPtr conn, unsigned int flags)
>  
>      virObjectLock(priv);
>  
> -    args.flags = flags;
> +    args.flags = flags ^ VIR_CONNECT_NO_ALIASES;

This won't mask out the flag, this will invert it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160505/7184e43c/attachment-0001.sig>


More information about the libvir-list mailing list