A later change will use the PortAllocator for SPICE too.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
virObjectEventStatePtr domainEventState;
/* Immutable pointer, self-locking APIs */
- virPortAllocatorPtr reservedVNCPorts;
+ virPortAllocatorPtr reservedGraphicsPorts;
/* Immutable pointer, self-locking APIs */
virPortAllocatorPtr migrationPorts;
vm->def->graphics[0]->data.vnc.autoport) {
vnc_port = vm->def->graphics[0]->data.vnc.port;
if (vnc_port >= LIBXL_VNC_PORT_MIN) {
- if (virPortAllocatorRelease(driver->reservedVNCPorts,
+ if (virPortAllocatorRelease(driver->reservedGraphicsPorts,
vnc_port) < 0)
VIR_DEBUG("Could not mark port %d as unused", vnc_port);
}
VIR_FREE(managed_save_path);
}
- if (libxlBuildDomainConfig(driver->reservedVNCPorts, vm->def,
+ if (libxlBuildDomainConfig(driver->reservedGraphicsPorts, vm->def,
cfg->ctx, &d_config) < 0)
goto cleanup;
virObjectUnref(libxl_driver->config);
virObjectUnref(libxl_driver->xmlopt);
virObjectUnref(libxl_driver->domains);
- virObjectUnref(libxl_driver->reservedVNCPorts);
+ virObjectUnref(libxl_driver->reservedGraphicsPorts);
virObjectUnref(libxl_driver->migrationPorts);
virLockManagerPluginUnref(libxl_driver->lockManager);
}
/* Allocate bitmap for vnc port reservation */
- if (!(libxl_driver->reservedVNCPorts =
+ if (!(libxl_driver->reservedGraphicsPorts =
virPortAllocatorNew(_("VNC"),
LIBXL_VNC_PORT_MIN,
LIBXL_VNC_PORT_MAX,