The code that setups listen types may change a listen type from address to
socket based on configuration from qemu.conf. This needs to be done before we
reserve/allocate ports that won't be used.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1364843
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
size_t i;
int ret = -1;
+ for (i = 0; i < vm->def->ngraphics; i++) {
+ graphics = vm->def->graphics[i];
+
+ if (qemuProcessGraphicsSetupListen(driver, graphics, vm) < 0)
+ goto cleanup;
+ }
+
if (allocate) {
for (i = 0; i < vm->def->ngraphics; i++) {
graphics = vm->def->graphics[i];
if (qemuProcessGraphicsAllocatePorts(driver, graphics, allocate) < 0)
goto cleanup;
-
- if (qemuProcessGraphicsSetupListen(driver, graphics, vm) < 0)
- goto cleanup;
}
ret = 0;