mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
libxl: change reservedVNCPorts to reservedGraphicsPorts
A later change will use the PortAllocator for SPICE too. Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
09f2faf933
commit
5a10fb1d2c
@ -140,7 +140,7 @@ struct _libxlDriverPrivate {
|
|||||||
virObjectEventStatePtr domainEventState;
|
virObjectEventStatePtr domainEventState;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, self-locking APIs */
|
||||||
virPortAllocatorPtr reservedVNCPorts;
|
virPortAllocatorPtr reservedGraphicsPorts;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, self-locking APIs */
|
||||||
virPortAllocatorPtr migrationPorts;
|
virPortAllocatorPtr migrationPorts;
|
||||||
|
@ -715,7 +715,7 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver,
|
|||||||
vm->def->graphics[0]->data.vnc.autoport) {
|
vm->def->graphics[0]->data.vnc.autoport) {
|
||||||
vnc_port = vm->def->graphics[0]->data.vnc.port;
|
vnc_port = vm->def->graphics[0]->data.vnc.port;
|
||||||
if (vnc_port >= LIBXL_VNC_PORT_MIN) {
|
if (vnc_port >= LIBXL_VNC_PORT_MIN) {
|
||||||
if (virPortAllocatorRelease(driver->reservedVNCPorts,
|
if (virPortAllocatorRelease(driver->reservedGraphicsPorts,
|
||||||
vnc_port) < 0)
|
vnc_port) < 0)
|
||||||
VIR_DEBUG("Could not mark port %d as unused", vnc_port);
|
VIR_DEBUG("Could not mark port %d as unused", vnc_port);
|
||||||
}
|
}
|
||||||
@ -979,7 +979,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
|||||||
VIR_FREE(managed_save_path);
|
VIR_FREE(managed_save_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libxlBuildDomainConfig(driver->reservedVNCPorts, vm->def,
|
if (libxlBuildDomainConfig(driver->reservedGraphicsPorts, vm->def,
|
||||||
cfg->ctx, &d_config) < 0)
|
cfg->ctx, &d_config) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ libxlStateCleanup(void)
|
|||||||
virObjectUnref(libxl_driver->config);
|
virObjectUnref(libxl_driver->config);
|
||||||
virObjectUnref(libxl_driver->xmlopt);
|
virObjectUnref(libxl_driver->xmlopt);
|
||||||
virObjectUnref(libxl_driver->domains);
|
virObjectUnref(libxl_driver->domains);
|
||||||
virObjectUnref(libxl_driver->reservedVNCPorts);
|
virObjectUnref(libxl_driver->reservedGraphicsPorts);
|
||||||
virObjectUnref(libxl_driver->migrationPorts);
|
virObjectUnref(libxl_driver->migrationPorts);
|
||||||
virLockManagerPluginUnref(libxl_driver->lockManager);
|
virLockManagerPluginUnref(libxl_driver->lockManager);
|
||||||
|
|
||||||
@ -523,7 +523,7 @@ libxlStateInitialize(bool privileged,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate bitmap for vnc port reservation */
|
/* Allocate bitmap for vnc port reservation */
|
||||||
if (!(libxl_driver->reservedVNCPorts =
|
if (!(libxl_driver->reservedGraphicsPorts =
|
||||||
virPortAllocatorNew(_("VNC"),
|
virPortAllocatorNew(_("VNC"),
|
||||||
LIBXL_VNC_PORT_MIN,
|
LIBXL_VNC_PORT_MIN,
|
||||||
LIBXL_VNC_PORT_MAX,
|
LIBXL_VNC_PORT_MAX,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user