mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virnetdaemon: Store servers in a hash table
Since the daemon can manage and add (at fresh start) multiple servers, we also should be able to add them from a JSON state file in case of a daemon restart, so post exec restart support for multiple servers is also provided. Patch also updates virnetdaemontest accordingly. Signed-off-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
@@ -1399,7 +1399,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if (!(dmn = virNetDaemonNew()) ||
|
||||
virNetDaemonAddServer(dmn, srv) < 0) {
|
||||
virNetDaemonAddServer(dmn, "libvirtd", srv) < 0) {
|
||||
ret = VIR_DAEMON_ERR_INIT;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -1472,7 +1472,7 @@ int main(int argc, char **argv) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virNetDaemonAddServer(dmn, srvAdm) < 0) {
|
||||
if (virNetDaemonAddServer(dmn, "admin", srvAdm) < 0) {
|
||||
ret = VIR_DAEMON_ERR_INIT;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user