提交 0ecf9b3e 编写于 作者: E Erik Skultety

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.
上级 b86cf882
......@@ -64,12 +64,12 @@ enum admin_procedure {
* in the function parameter list.
*/
/**
* @generate: client
* @generate: none
*/
ADMIN_PROC_CONNECT_OPEN = 1,
/**
* @generate: client
* @generate: none
*/
ADMIN_PROC_CONNECT_CLOSE = 2
};
......@@ -101,6 +101,51 @@ call(virAdmConnectPtr conn,
#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
remoteAdminPrivFree(void *opaque)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册