[libvirt] [PATCH 3/3] qemu: fix xml dump of autogenerated websocket

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Tue Nov 22 11:09:33 UTC 2016


---
 src/conf/domain_conf.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6e008e2..fb6ff0b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -22534,7 +22534,10 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
             virBufferAsprintf(buf, " autoport='%s'",
                               def->data.vnc.autoport ? "yes" : "no");
 
-            if (def->data.vnc.websocket)
+            if (def->data.vnc.websocketGenerated &&
+                (flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE))
+                virBufferAddLit(buf, " websocket='-1'");
+            else if (def->data.vnc.websocket)
                 virBufferAsprintf(buf, " websocket='%d'", def->data.vnc.websocket);
 
             virDomainGraphicsListenDefFormatAddr(buf, glisten, flags);
-- 
1.8.3.1




More information about the libvir-list mailing list