]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: cleanup code to release VNC port
authorNikolay Shirokovskiy <nshirokovskiy@openvz.org>
Mon, 11 Apr 2022 12:02:42 +0000 (15:02 +0300)
committerNikolay Shirokovskiy <nshirokovskiy@openvz.org>
Wed, 13 Apr 2022 14:45:12 +0000 (17:45 +0300)
commit658ce2c3d404d9faa06b82da56d3340f4bbdc6c3
tree8b9b5a02f98890523f4cb6b41c0a0c8c5690f895
parent8b60342f76a744e61c16ea683b44996dd462bfda
qemu: cleanup code to release VNC port

Code to release VNC port looks repetitive. The reason is there were
originally 2 functions to release ports - for auto and non-auto cases.

Also portReserved flag is not cleared on stop in case of reconnect with
auto port (flags is set on reconnect in qemuProcessGraphicsReservePorts call).
Yeah config is freed in the end of stopping domain but still.

Let's use this flag whenever we reserve port (auto or not). This makes
things clearer.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_process.c