[PATCH 5/5] qemu_process: graphics: setup listen types before ports are reserved/allocated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1364843

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/qemu/qemu_process.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index b3c6400..2b857bb 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4213,6 +4213,13 @@ qemuProcessSetupGraphics(virQEMUDriverPtr driver,
     size_t i;
     int ret = -1;
 
+    for (i = 0; i < vm->def->ngraphics; i++) {
+        graphics = vm->def->graphics[i];
+
+        if (qemuProcessGraphicsSetupListen(driver, graphics, vm) < 0)
+            goto cleanup;
+    }
+
     if (allocate) {
         for (i = 0; i < vm->def->ngraphics; i++) {
             graphics = vm->def->graphics[i];
@@ -4227,9 +4234,6 @@ qemuProcessSetupGraphics(virQEMUDriverPtr driver,
 
         if (qemuProcessGraphicsAllocatePorts(driver, graphics, allocate) < 0)
             goto cleanup;
-
-        if (qemuProcessGraphicsSetupListen(driver, graphics, vm) < 0)
-            goto cleanup;
     }
 
     ret = 0;
-- 
2.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]