提交 b805e342 编写于 作者: M Martin Kletzander

qemu: fix remote port searching

After fixing the last review comments on remote port searching (commit
a14b4aea), the commit right after that
wasn't modified accordingly, therefore two values weren't changed as
they should and the configurable ports don't work as expected.

This simple commit changes last two values missed and fixes the issue.
上级 c289ebac
...@@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn, ...@@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn,
if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
!vm->def->graphics[0]->data.vnc.socket && !vm->def->graphics[0]->data.vnc.socket &&
vm->def->graphics[0]->data.vnc.autoport) { vm->def->graphics[0]->data.vnc.autoport) {
int port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); int port = qemuProcessNextFreePort(driver, driver->remotePortMin);
if (port < 0) { if (port < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("Unable to find an unused port for VNC")); "%s", _("Unable to find an unused port for VNC"));
...@@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn, ...@@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn,
int port = -1; int port = -1;
if (vm->def->graphics[0]->data.spice.autoport || if (vm->def->graphics[0]->data.spice.autoport ||
vm->def->graphics[0]->data.spice.port == -1) { vm->def->graphics[0]->data.spice.port == -1) {
port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); port = qemuProcessNextFreePort(driver, driver->remotePortMin);
if (port < 0) { if (port < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册