[PATCH] qemu: only release SPICE TLS port if it has been allocated

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

 



Silence the error message that happens during shutdown of a domain with
spice graphics, autoport enabled if spice_tls is disabled in qemu.conf:

error : virPortAllocatorRelease:174 : port 0 must be in range (5900, 65534)
---
 src/qemu/qemu_process.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index b560d2e..1e2bcae 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4321,8 +4321,10 @@ retry:
             graphics->data.spice.autoport) {
             ignore_value(virPortAllocatorRelease(driver->remotePorts,
                                                  graphics->data.spice.port));
-            ignore_value(virPortAllocatorRelease(driver->remotePorts,
-                                                 graphics->data.spice.tlsPort));
+            if (cfg->spiceTLS) {
+                ignore_value(virPortAllocatorRelease(driver->remotePorts,
+                                                     graphics->data.spice.tlsPort));
+            }
         }
     }
 
-- 
1.7.12.4

--
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]