]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
xenconfig: format spice listenAddr when formating ports
authorJim Fehlig <jfehlig@suse.com>
Thu, 23 Apr 2015 21:42:50 +0000 (15:42 -0600)
committerJim Fehlig <jfehlig@suse.com>
Mon, 18 May 2015 18:46:16 +0000 (12:46 -0600)
Move formating of spice listenAddr to the section of code
where spice ports are formatted.  It is more logical to
format address and ports together.  Account for the change
in spice cfg test file by moving 'spicehost'.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/xenconfig/xen_xl.c
tests/xlconfigdata/test-spice.cfg

index 767ac014d96f6e7a50777b63577611767f453ae7..19a2698848d50e6578bce7d0de86a871876b749e 100644 (file)
@@ -683,6 +683,11 @@ xenFormatXLSpice(virConfPtr conf, virDomainDefPtr def)
             if (xenConfigSetInt(conf, "spice", 1) < 0)
                 return -1;
 
+            listenAddr = virDomainGraphicsListenGetAddress(graphics, 0);
+            if (listenAddr &&
+                xenConfigSetString(conf, "spicehost", listenAddr) < 0)
+                return -1;
+
             if (xenConfigSetInt(conf, "spiceport",
                                 graphics->data.spice.port) < 0)
                 return -1;
@@ -701,11 +706,6 @@ xenFormatXLSpice(virConfPtr conf, virDomainDefPtr def)
                     return -1;
             }
 
-            listenAddr = virDomainGraphicsListenGetAddress(graphics, 0);
-            if (listenAddr &&
-                xenConfigSetString(conf, "spicehost", listenAddr) < 0)
-                return -1;
-
             if (xenConfigSetInt(conf, "spiceagent_mouse",
                                 graphics->data.spice.mousemode) < 0)
                 return -1;
index 21f0e55afda2a402e9eee481f9dce2cc357d20ff..b2b9742fed70f134429462cf9fa98d3d7d3ce735 100644 (file)
@@ -22,9 +22,9 @@ disk = [ "/dev/HostVG/XenGuest2,raw,hda,w,backendtype=phy", "/root/boot.iso,raw,
 sdl = 0
 vnc = 0
 spice = 1
+spicehost = "127.0.0.1"
 spiceport = 590
 spicetls_port = 500
 spicedisable_ticketing = 1
 spicepasswd = "thebeast"
-spicehost = "127.0.0.1"
 spiceagent_mouse = 0