From a0dbed61609310cc50bd923e7a9bf3683cbf9f46 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Tue, 1 Mar 2016 15:31:18 +0100 Subject: [PATCH] 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: Martin Kletzander --- daemon/admin.c | 6 +++--- daemon/admin_server.c | 6 +++--- daemon/admin_server.h | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/daemon/admin.c b/daemon/admin.c index 0c1ddc0709..cae2a84d84 100644 --- a/daemon/admin.c +++ b/daemon/admin.c @@ -82,9 +82,9 @@ remoteAdmClientInitHook(virNetServerClientPtr client ATTRIBUTE_UNUSED, static void 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 */ @@ -141,7 +141,7 @@ adminDispatchConnectListServers(virNetServerPtr server ATTRIBUTE_UNUSED, admin_connect_list_servers_args *args, admin_connect_list_servers_ret *ret) { - virAdmServerPtr *servers = NULL; + virNetServerPtr *servers = NULL; int nservers = 0; int rv = -1; size_t i; diff --git a/daemon/admin_server.c b/daemon/admin_server.c index 0196bfe8d4..0ccb39e91c 100644 --- a/daemon/admin_server.c +++ b/daemon/admin_server.c @@ -38,12 +38,12 @@ VIR_LOG_INIT("daemon.admin_server"); int adminDaemonListServers(virNetDaemonPtr dmn, - virAdmServerPtr **servers, + virNetServerPtr **servers, unsigned int flags) { int ret = -1; const char **srv_names = NULL; - virAdmServerPtr *srvs = NULL; + virNetServerPtr *srvs = NULL; size_t i; ssize_t nsrvs = 0; @@ -57,7 +57,7 @@ adminDaemonListServers(virNetDaemonPtr dmn, goto cleanup; for (i = 0; i < nsrvs; i++) { - if (!(srvs[i] = virAdmGetServer(NULL, srv_names[i]))) + if (!(srvs[i] = virNetDaemonGetServer(dmn, srv_names[i]))) goto cleanup; } diff --git a/daemon/admin_server.h b/daemon/admin_server.h index 2a5aa16335..606442c19f 100644 --- a/daemon/admin_server.h +++ b/daemon/admin_server.h @@ -26,9 +26,8 @@ # include "rpc/virnetdaemon.h" -int -adminDaemonListServers(virNetDaemonPtr dmn, - virAdmServerPtr **servers, - unsigned int flags); +int adminDaemonListServers(virNetDaemonPtr dmn, + virNetServerPtr **servers, + unsigned int flags); #endif /* __LIBVIRTD_ADMIN_SERVER_H__ */