提交 d7bc6af6 编写于 作者: N Nikolay Shirokovskiy

qemu: keep websocketGenerated on libvirtd restarts

Otherwise after libvirtd restart we come back to issues fixed by
introducing this flag in [1].

[1] 61a0026a : qemu: Fix xml dump of autogenerated websocket
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 30f9a64c
......@@ -13498,6 +13498,7 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
{
char *port = virXMLPropString(node, "port");
char *websocket = virXMLPropString(node, "websocket");
char *websocketGenerated = virXMLPropString(node, "websocketGenerated");
char *sharePolicy = virXMLPropString(node, "sharePolicy");
char *autoport = virXMLPropString(node, "autoport");
int ret = -1;
......@@ -13542,6 +13543,9 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
}
}
if (websocketGenerated && STREQ(websocketGenerated, "yes"))
def->data.vnc.websocketGenerated = true;
if (sharePolicy) {
int policy =
virDomainGraphicsVNCSharePolicyTypeFromString(sharePolicy);
......@@ -13567,6 +13571,7 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
VIR_FREE(port);
VIR_FREE(autoport);
VIR_FREE(websocket);
VIR_FREE(websocketGenerated);
VIR_FREE(sharePolicy);
return ret;
}
......@@ -26399,6 +26404,10 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
else if (def->data.vnc.websocket)
virBufferAsprintf(buf, " websocket='%d'", def->data.vnc.websocket);
if (flags & VIR_DOMAIN_DEF_FORMAT_STATUS)
virBufferAsprintf(buf, " websocketGenerated='%s'",
def->data.vnc.websocketGenerated ? "yes" : "no");
virDomainGraphicsListenDefFormatAddr(buf, glisten, flags);
break;
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册