daemon: Get server name from the server itself

Since servers know their name, there is no need to supply such
information twice.  Also defeats inconsistencies.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2016-03-11 12:58:41 +01:00
parent dad3b07814
commit fd4f278e1a
7 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -1400,7 +1400,7 @@ int main(int argc, char **argv) {
}
if (!(dmn = virNetDaemonNew()) ||
virNetDaemonAddServer(dmn, "libvirtd", srv) < 0) {
virNetDaemonAddServer(dmn, srv) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
@@ -1474,7 +1474,7 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (virNetDaemonAddServer(dmn, "admin", srvAdm) < 0) {
if (virNetDaemonAddServer(dmn, srvAdm) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}