]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
libxl: change reservedVNCPorts to reservedGraphicsPorts
authorJim Fehlig <jfehlig@suse.com>
Tue, 28 Apr 2015 00:53:04 +0000 (18:53 -0600)
committerJim Fehlig <jfehlig@suse.com>
Thu, 28 May 2015 18:40:43 +0000 (12:40 -0600)
A later change will use the PortAllocator for SPICE too.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_conf.h
src/libxl/libxl_domain.c
src/libxl/libxl_driver.c

index 0a1c0db9dccb358662a940d8d2937954bd17c358..9c29b1e2894d1bbb88cd0d4f4979f119fa1c2280 100644 (file)
@@ -140,7 +140,7 @@ struct _libxlDriverPrivate {
     virObjectEventStatePtr domainEventState;
 
     /* Immutable pointer, self-locking APIs */
-    virPortAllocatorPtr reservedVNCPorts;
+    virPortAllocatorPtr reservedGraphicsPorts;
 
     /* Immutable pointer, self-locking APIs */
     virPortAllocatorPtr migrationPorts;
index 5f5f8e53f23d82ffcf57639ba8fa684e332e5850..68dd28e9c8b7d6b2463a532fb6d6a43d0f090969 100644 (file)
@@ -715,7 +715,7 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver,
         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);
         }
@@ -979,7 +979,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
         VIR_FREE(managed_save_path);
     }
 
-    if (libxlBuildDomainConfig(driver->reservedVNCPorts, vm->def,
+    if (libxlBuildDomainConfig(driver->reservedGraphicsPorts, vm->def,
                                cfg->ctx, &d_config) < 0)
         goto cleanup;
 
index 12be81609af28f092a1975325c13f6b1d1d0792a..c297d12271bf9974008457fc5c1ab42121082ed9 100644 (file)
@@ -410,7 +410,7 @@ libxlStateCleanup(void)
     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);
 
@@ -523,7 +523,7 @@ libxlStateInitialize(bool privileged,
     }
 
     /* Allocate bitmap for vnc port reservation */
-    if (!(libxl_driver->reservedVNCPorts =
+    if (!(libxl_driver->reservedGraphicsPorts =
           virPortAllocatorNew(_("VNC"),
                               LIBXL_VNC_PORT_MIN,
                               LIBXL_VNC_PORT_MAX,