提交 2cc6c652 编写于 作者: M Martin Kletzander

Revert "admin: Add virAdmHello function"

This reverts commit 5792fabb.

I mistakenly pushed it along with the Admin API series.
上级 220393bf
...@@ -114,27 +114,4 @@ adminDispatchConnectClose(virNetServerPtr server ATTRIBUTE_UNUSED, ...@@ -114,27 +114,4 @@ adminDispatchConnectClose(virNetServerPtr server ATTRIBUTE_UNUSED,
return 0; return 0;
} }
static char *
admHello(virNetDaemonPtr dmn,
unsigned int flags)
{
char *ret = NULL;
virNetServerPtr srv = NULL;
size_t nclients;
virCheckFlags(0, NULL);
if (!(srv = virNetDaemonGetServer(dmn, 0)))
return NULL;
nclients = virNetServerGetNClients(srv);
if (virAsprintf(&ret, "Clients: %zu", nclients) < 0)
goto cleanup;
cleanup:
virObjectUnref(srv);
return ret;
}
#include "admin_dispatch.h" #include "admin_dispatch.h"
...@@ -54,7 +54,6 @@ virAdmConnectPtr virAdmConnectOpen(const char *name, unsigned int flags); ...@@ -54,7 +54,6 @@ virAdmConnectPtr virAdmConnectOpen(const char *name, unsigned int flags);
int virAdmConnectClose(virAdmConnectPtr conn); int virAdmConnectClose(virAdmConnectPtr conn);
int virAdmConnectRef(virAdmConnectPtr conn); int virAdmConnectRef(virAdmConnectPtr conn);
char *virAdmHello(virAdmConnectPtr conn, unsigned int flags);
# ifdef __cplusplus # ifdef __cplusplus
} }
......
daemon/admin_dispatch.h
daemon/admin_server.c daemon/admin_server.c
daemon/libvirtd-config.c daemon/libvirtd-config.c
daemon/libvirtd.c daemon/libvirtd.c
......
...@@ -43,15 +43,6 @@ struct admin_connect_open_args { ...@@ -43,15 +43,6 @@ struct admin_connect_open_args {
unsigned int flags; unsigned int flags;
}; };
struct admin_hello_args {
unsigned int flags;
};
struct admin_hello_ret {
admin_string greeting;
};
/* Define the program number, protocol version and procedure numbers here. */ /* Define the program number, protocol version and procedure numbers here. */
const ADMIN_PROGRAM = 0x06900690; const ADMIN_PROGRAM = 0x06900690;
const ADMIN_PROTOCOL_VERSION = 1; const ADMIN_PROTOCOL_VERSION = 1;
...@@ -82,10 +73,5 @@ enum admin_procedure { ...@@ -82,10 +73,5 @@ enum admin_procedure {
/** /**
* @generate: client * @generate: client
*/ */
ADMIN_PROC_CONNECT_CLOSE = 2, ADMIN_PROC_CONNECT_CLOSE = 2
/**
* @generate: both
*/
ADMIN_PROC_HELLO = 3
}; };
...@@ -2,14 +2,7 @@ ...@@ -2,14 +2,7 @@
struct admin_connect_open_args { struct admin_connect_open_args {
u_int flags; u_int flags;
}; };
struct admin_hello_args {
u_int flags;
};
struct admin_hello_ret {
admin_string greeting;
};
enum admin_procedure { enum admin_procedure {
ADMIN_PROC_CONNECT_OPEN = 1, ADMIN_PROC_CONNECT_OPEN = 1,
ADMIN_PROC_CONNECT_CLOSE = 2, ADMIN_PROC_CONNECT_CLOSE = 2,
ADMIN_PROC_HELLO = 3,
}; };
...@@ -384,29 +384,3 @@ virAdmConnectRef(virAdmConnectPtr conn) ...@@ -384,29 +384,3 @@ virAdmConnectRef(virAdmConnectPtr conn)
return 0; return 0;
} }
/**
* virAdmHello:
* @conn: a connection object
* @flags: unused, 0 for now
*
* Testing function.
*
* Returns the number of connected clients as a string. Yes, as a
* string. Because it's just for testing.
*/
char *
virAdmHello(virAdmConnectPtr conn,
unsigned int flags)
{
char *ret = NULL;
virResetLastError();
ret = remoteAdminHello(conn, flags);
if (!ret)
virDispatchError(NULL);
return ret;
}
...@@ -15,5 +15,4 @@ LIBVIRT_ADMIN_1.3.0 { ...@@ -15,5 +15,4 @@ LIBVIRT_ADMIN_1.3.0 {
virAdmConnectOpen; virAdmConnectOpen;
virAdmConnectClose; virAdmConnectClose;
virAdmConnectRef; virAdmConnectRef;
virAdmHello;
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册