diff --git a/src/admin/admin_protocol.x b/src/admin/admin_protocol.x index cfc92ff74852181e18eb2e1d3034bc6247f0b3f2..d0ca1a375755dc4b10aaa6d89621777eedb3494a 100644 --- a/src/admin/admin_protocol.x +++ b/src/admin/admin_protocol.x @@ -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 }; diff --git a/src/admin/admin_remote.c b/src/admin/admin_remote.c index b8e66070cfbc60e18e0f0c04b3eb0b4964a8493f..2c02ba6ec17a58130f2f31611aff14b20d5e1ecc 100644 --- a/src/admin/admin_remote.c +++ b/src/admin/admin_remote.c @@ -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) {