提交 a0dbed61 编写于 作者: M Martin Kletzander

admin: Do not work with virAdm on the server side

virAdm is prefix only used on the client side.  Or at least for now.  On
server, though, this corresponds to virNet structures (virAdmConnect is
virNetDaemon, virAdmServer should be virNetServer, in the future
virAdmClient will be resolved to virNetServerClient, and so on).

This will also make future work clearer and easier.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 83942e5b
...@@ -82,9 +82,9 @@ remoteAdmClientInitHook(virNetServerClientPtr client ATTRIBUTE_UNUSED, ...@@ -82,9 +82,9 @@ remoteAdmClientInitHook(virNetServerClientPtr client ATTRIBUTE_UNUSED,
static void static void
make_nonnull_server(admin_nonnull_server *srv_dst, make_nonnull_server(admin_nonnull_server *srv_dst,
virAdmServerPtr srv_src) virNetServerPtr srv_src)
{ {
ignore_value(VIR_STRDUP_QUIET(srv_dst->name, srv_src->name)); ignore_value(VIR_STRDUP_QUIET(srv_dst->name, virNetServerGetName(srv_src)));
} }
/* Functions */ /* Functions */
...@@ -141,7 +141,7 @@ adminDispatchConnectListServers(virNetServerPtr server ATTRIBUTE_UNUSED, ...@@ -141,7 +141,7 @@ adminDispatchConnectListServers(virNetServerPtr server ATTRIBUTE_UNUSED,
admin_connect_list_servers_args *args, admin_connect_list_servers_args *args,
admin_connect_list_servers_ret *ret) admin_connect_list_servers_ret *ret)
{ {
virAdmServerPtr *servers = NULL; virNetServerPtr *servers = NULL;
int nservers = 0; int nservers = 0;
int rv = -1; int rv = -1;
size_t i; size_t i;
......
...@@ -38,12 +38,12 @@ VIR_LOG_INIT("daemon.admin_server"); ...@@ -38,12 +38,12 @@ VIR_LOG_INIT("daemon.admin_server");
int int
adminDaemonListServers(virNetDaemonPtr dmn, adminDaemonListServers(virNetDaemonPtr dmn,
virAdmServerPtr **servers, virNetServerPtr **servers,
unsigned int flags) unsigned int flags)
{ {
int ret = -1; int ret = -1;
const char **srv_names = NULL; const char **srv_names = NULL;
virAdmServerPtr *srvs = NULL; virNetServerPtr *srvs = NULL;
size_t i; size_t i;
ssize_t nsrvs = 0; ssize_t nsrvs = 0;
...@@ -57,7 +57,7 @@ adminDaemonListServers(virNetDaemonPtr dmn, ...@@ -57,7 +57,7 @@ adminDaemonListServers(virNetDaemonPtr dmn,
goto cleanup; goto cleanup;
for (i = 0; i < nsrvs; i++) { for (i = 0; i < nsrvs; i++) {
if (!(srvs[i] = virAdmGetServer(NULL, srv_names[i]))) if (!(srvs[i] = virNetDaemonGetServer(dmn, srv_names[i])))
goto cleanup; goto cleanup;
} }
......
...@@ -26,9 +26,8 @@ ...@@ -26,9 +26,8 @@
# include "rpc/virnetdaemon.h" # include "rpc/virnetdaemon.h"
int int adminDaemonListServers(virNetDaemonPtr dmn,
adminDaemonListServers(virNetDaemonPtr dmn, virNetServerPtr **servers,
virAdmServerPtr **servers, unsigned int flags);
unsigned int flags);
#endif /* __LIBVIRTD_ADMIN_SERVER_H__ */ #endif /* __LIBVIRTD_ADMIN_SERVER_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册