On 01/25/2017 12:26 PM, Pavel Hrdina wrote:
The issue is that if this graphics definition is provided:
<graphics type='vnc' port='0'/>
it's parsed as:
<graphics type='vnc' autoport='no'>
<listen type='address'/>
</graphics>
but if the resulting XML is parsed again the output is:
<graphics type='vnc' port='-1' autoport='yes'>
<listen type='address'/>
</graphics>
and this should not happen. The XML have to always remain the same
after it was already parsed by libvirt.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1383039
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 2 ++
.../generic-graphics-vnc-autoport-no.xml | 30 ++++++++++++++++++++++
tests/genericxml2xmltest.c | 1 +
3 files changed, 33 insertions(+)
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-autoport-no.xml
I know this is a VNC bug, but RDP has similar code which would seemingly
have the same issue.
The SPICE code is a bit different (I assume it doesn't have the legacy
compat issue). It doesn't set autoport when "port" is not supplied.
ACK for this change, though.
John