mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
30f9a64cbd
commit
d7bc6af648
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user