mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-07 05:57:30 +03:00
admin: Remove flags checking from virAdmConnectOpen public API
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@redhat.com>
This commit is contained in:
parent
c53595785d
commit
37675f6b66
@ -162,7 +162,7 @@ remoteAdminConnectOpen(virAdmConnectPtr conn, unsigned int flags)
|
||||
|
||||
virObjectLock(priv);
|
||||
|
||||
args.flags = flags;
|
||||
args.flags = flags & ~VIR_CONNECT_NO_ALIASES;
|
||||
|
||||
if (virNetClientRegisterAsyncIO(priv->client) < 0) {
|
||||
VIR_DEBUG("Failed to add event watch, disabling events and support for"
|
||||
|
@ -185,7 +185,8 @@ virAdmGetDefaultURI(virConfPtr conf)
|
||||
/**
|
||||
* virAdmConnectOpen:
|
||||
* @name: uri of the daemon to connect to, NULL for default
|
||||
* @flags: extra flags; not used yet, so callers should always pass 0
|
||||
* @flags: bitwise-OR of virConnectFlags; so far the only supported flag is
|
||||
* VIR_CONNECT_NO_ALIASES
|
||||
*
|
||||
* Opens connection to admin interface of the daemon.
|
||||
*
|
||||
@ -204,7 +205,6 @@ virAdmConnectOpen(const char *name, unsigned int flags)
|
||||
|
||||
VIR_DEBUG("flags=%x", flags);
|
||||
virResetLastError();
|
||||
virCheckFlagsGoto(VIR_CONNECT_NO_ALIASES, error);
|
||||
|
||||
if (!(conn = virAdmConnectNew()))
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user