[PATCH 4/5] qemu_process: graphics: reserve port only if listen type is address or network

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

 



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

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d61f704..b3c6400 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4009,6 +4009,17 @@ static int
 qemuProcessGraphicsReservePorts(virQEMUDriverPtr driver,
                                 virDomainGraphicsDefPtr graphics)
 {
+    virDomainGraphicsListenDefPtr glisten;
+
+    if (graphics->nListens <= 0)
+        return 0;
+
+    glisten = &graphics->listens[0];
+
+    if (glisten->type != VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS &&
+        glisten->type != VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK)
+        return 0;
+
     if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
         !graphics->data.vnc.autoport) {
         if (virPortAllocatorSetUsed(driver->remotePorts,
-- 
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]