mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
conf: Fix incorrect spice graphic XML format on compression options
If spice graphics has no <channel> elements, the output graphics XML is messed up. To prevent this, we need to end the <graphics> element just before adding any compression selecting elements.
This commit is contained in:
parent
ef983dfe5a
commit
155542a57f
@ -8998,6 +8998,12 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
|
||||
virDomainGraphicsSpiceChannelNameTypeToString(i),
|
||||
virDomainGraphicsSpiceChannelModeTypeToString(mode));
|
||||
}
|
||||
if (!children && (def->data.spice.image || def->data.spice.jpeg ||
|
||||
def->data.spice.zlib || def->data.spice.playback ||
|
||||
def->data.spice.streaming)) {
|
||||
virBufferAddLit(buf, ">\n");
|
||||
children = 1;
|
||||
}
|
||||
if (def->data.spice.image)
|
||||
virBufferAsprintf(buf, " <image compression='%s'/>\n",
|
||||
virDomainGraphicsSpiceImageCompressionTypeToString(def->data.spice.image));
|
||||
|
Loading…
Reference in New Issue
Block a user