]> git.ipfire.org Git - thirdparty/libvirt.git/commit
domain_conf: vnc: preserve autoport value if no port was specified
authorPavel Hrdina <phrdina@redhat.com>
Wed, 25 Jan 2017 16:42:07 +0000 (17:42 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 27 Jan 2017 08:46:03 +0000 (09:46 +0100)
commitf19390d2d3ab18cc9bff53e1d642e4e2b534f5a5
tree4943fa2b3b34c3f75023a1df3d4234fa378e8e36
parent425a6837a6e87a15d1f3f802fe7b17e4e0dc5cae
domain_conf: vnc: preserve autoport value if no port was specified

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@redhat.com>
src/conf/domain_conf.c
tests/genericxml2xmlindata/generic-graphics-vnc-autoport-no.xml [new file with mode: 0644]
tests/genericxml2xmltest.c