mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
admin: Do not generate remoteAdminConnect{Open,Close}
As we plan to add more and more logic to remote connecting methods, these cannot be generated from admin_protocol.x anymore. Instead, this patch implements these to methods explicitly.
This commit is contained in:
parent
b86cf8821b
commit
0ecf9b3e09
@ -64,12 +64,12 @@ enum admin_procedure {
|
|||||||
* in the function parameter list.
|
* in the function parameter list.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @generate: client
|
* @generate: none
|
||||||
*/
|
*/
|
||||||
ADMIN_PROC_CONNECT_OPEN = 1,
|
ADMIN_PROC_CONNECT_OPEN = 1,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @generate: client
|
* @generate: none
|
||||||
*/
|
*/
|
||||||
ADMIN_PROC_CONNECT_CLOSE = 2
|
ADMIN_PROC_CONNECT_CLOSE = 2
|
||||||
};
|
};
|
||||||
|
@ -101,6 +101,51 @@ call(virAdmConnectPtr conn,
|
|||||||
|
|
||||||
#include "admin_client.h"
|
#include "admin_client.h"
|
||||||
|
|
||||||
|
static int
|
||||||
|
remoteAdminConnectOpen(virAdmConnectPtr conn, unsigned int flags)
|
||||||
|
{
|
||||||
|
int rv = -1;
|
||||||
|
remoteAdminPrivPtr priv = conn->privateData;
|
||||||
|
admin_connect_open_args args;
|
||||||
|
|
||||||
|
virObjectLock(priv);
|
||||||
|
|
||||||
|
args.flags = flags;
|
||||||
|
|
||||||
|
if (call(conn, 0, ADMIN_PROC_CONNECT_OPEN,
|
||||||
|
(xdrproc_t)xdr_admin_connect_open_args, (char *)&args,
|
||||||
|
(xdrproc_t)xdr_void, (char *)NULL) == -1) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = 0;
|
||||||
|
|
||||||
|
done:
|
||||||
|
virObjectUnlock(priv);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
remoteAdminConnectClose(virAdmConnectPtr conn)
|
||||||
|
{
|
||||||
|
int rv = -1;
|
||||||
|
remoteAdminPrivPtr priv = conn->privateData;
|
||||||
|
|
||||||
|
virObjectLock(priv);
|
||||||
|
|
||||||
|
if (call(conn, 0, ADMIN_PROC_CONNECT_CLOSE,
|
||||||
|
(xdrproc_t)xdr_void, (char *)NULL,
|
||||||
|
(xdrproc_t)xdr_void, (char *)NULL) == -1) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = 0;
|
||||||
|
|
||||||
|
done:
|
||||||
|
virObjectUnlock(priv);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
remoteAdminPrivFree(void *opaque)
|
remoteAdminPrivFree(void *opaque)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user