[libvirt] [PATCH] qemu: fix remote port searching

After fixing the last review comments on remote port searching (commit a14b4aea512d6c3a42af56207a65ef10ac4a12a1), 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. --- This time I double checked that it does what it should! src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7f85aea..5c3b89e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn, if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && !vm->def->graphics[0]->data.vnc.socket && vm->def->graphics[0]->data.vnc.autoport) { - int port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + int port = qemuProcessNextFreePort(driver, driver->remotePortMin); if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to find an unused port for VNC")); @@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn, int port = -1; if (vm->def->graphics[0]->data.spice.autoport || vm->def->graphics[0]->data.spice.port == -1) { - port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + port = qemuProcessNextFreePort(driver, driver->remotePortMin); if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, -- 1.7.12

On Fri, Aug 31, 2012 at 15:48:19 +0200, Martin Kletzander wrote:
After fixing the last review comments on remote port searching (commit a14b4aea512d6c3a42af56207a65ef10ac4a12a1), 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. --- This time I double checked that it does what it should!
src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7f85aea..5c3b89e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn, if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && !vm->def->graphics[0]->data.vnc.socket && vm->def->graphics[0]->data.vnc.autoport) { - int port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + int port = qemuProcessNextFreePort(driver, driver->remotePortMin); if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to find an unused port for VNC")); @@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn, int port = -1; if (vm->def->graphics[0]->data.spice.autoport || vm->def->graphics[0]->data.spice.port == -1) { - port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + port = qemuProcessNextFreePort(driver, driver->remotePortMin);
if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR,
Looks like the right fix, ACK Jirka

On 08/31/2012 04:06 PM, Jiri Denemark wrote:
On Fri, Aug 31, 2012 at 15:48:19 +0200, Martin Kletzander wrote:
After fixing the last review comments on remote port searching (commit a14b4aea512d6c3a42af56207a65ef10ac4a12a1), 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. --- This time I double checked that it does what it should!
src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7f85aea..5c3b89e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn, if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && !vm->def->graphics[0]->data.vnc.socket && vm->def->graphics[0]->data.vnc.autoport) { - int port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + int port = qemuProcessNextFreePort(driver, driver->remotePortMin); if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to find an unused port for VNC")); @@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn, int port = -1; if (vm->def->graphics[0]->data.spice.autoport || vm->def->graphics[0]->data.spice.port == -1) { - port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + port = qemuProcessNextFreePort(driver, driver->remotePortMin);
if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR,
Looks like the right fix, ACK
Jirka
Thanks, pushed. Martin

On Fri, Aug 31, 2012 at 04:09:39PM +0200, Martin Kletzander wrote:
On 08/31/2012 04:06 PM, Jiri Denemark wrote:
On Fri, Aug 31, 2012 at 15:48:19 +0200, Martin Kletzander wrote:
After fixing the last review comments on remote port searching (commit a14b4aea512d6c3a42af56207a65ef10ac4a12a1), 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. --- This time I double checked that it does what it should!
src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7f85aea..5c3b89e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn, if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && !vm->def->graphics[0]->data.vnc.socket && vm->def->graphics[0]->data.vnc.autoport) { - int port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + int port = qemuProcessNextFreePort(driver, driver->remotePortMin); if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to find an unused port for VNC")); @@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn, int port = -1; if (vm->def->graphics[0]->data.spice.autoport || vm->def->graphics[0]->data.spice.port == -1) { - port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + port = qemuProcessNextFreePort(driver, driver->remotePortMin);
if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR,
Looks like the right fix, ACK
Jirka
Thanks, pushed.
Hum, too bad that would have been good in 0.10.1, but after all 0.10.2 should not be too far away anyway ... Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 08/31/2012 04:29 PM, Daniel Veillard wrote:
On Fri, Aug 31, 2012 at 04:09:39PM +0200, Martin Kletzander wrote:
On 08/31/2012 04:06 PM, Jiri Denemark wrote:
On Fri, Aug 31, 2012 at 15:48:19 +0200, Martin Kletzander wrote:
After fixing the last review comments on remote port searching (commit a14b4aea512d6c3a42af56207a65ef10ac4a12a1), 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. --- This time I double checked that it does what it should!
src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7f85aea..5c3b89e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3467,7 +3467,7 @@ int qemuProcessStart(virConnectPtr conn, if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC && !vm->def->graphics[0]->data.vnc.socket && vm->def->graphics[0]->data.vnc.autoport) { - int port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + int port = qemuProcessNextFreePort(driver, driver->remotePortMin); if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to find an unused port for VNC")); @@ -3478,7 +3478,7 @@ int qemuProcessStart(virConnectPtr conn, int port = -1; if (vm->def->graphics[0]->data.spice.autoport || vm->def->graphics[0]->data.spice.port == -1) { - port = qemuProcessNextFreePort(driver, QEMU_REMOTE_PORT_MIN); + port = qemuProcessNextFreePort(driver, driver->remotePortMin);
if (port < 0) { virReportError(VIR_ERR_INTERNAL_ERROR,
Looks like the right fix, ACK
Jirka
Thanks, pushed.
Hum, too bad that would have been good in 0.10.1, but after all 0.10.2 should not be too far away anyway ...
Daniel
I know, but I was away yesterday and today morning, so I didn't manage to even read about the problem. It is a pity, but nothing can be done now. I'll try to get better next time, I promise ;) Martin

On Fri, Aug 31, 2012 at 04:31:56PM +0200, Martin Kletzander wrote:
On 08/31/2012 04:29 PM, Daniel Veillard wrote:
On Fri, Aug 31, 2012 at 04:09:39PM +0200, Martin Kletzander wrote: Hum, too bad that would have been good in 0.10.1, but after all 0.10.2 should not be too far away anyway ...
Daniel
I know, but I was away yesterday and today morning, so I didn't manage to even read about the problem. It is a pity, but nothing can be done now. I'll try to get better next time, I promise ;)
Well I am sorry, if I had waited one more hour I would have pulled that one too. That's what I tried to convey, don't read it any differently ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel Veillard
-
Jiri Denemark
-
Martin Kletzander