[libvirt] [PATCH 06/10] Support automatic port number allocation for SPICE
Eric Blake
eblake at redhat.com
Tue Nov 2 22:54:07 UTC 2010
On 11/01/2010 12:17 PM, Daniel P. Berrange wrote:
> * src/qemu/qemu_driver.c: Allocate the TCP ports for SPICE
> before starting guest
> ---
> src/qemu/qemu_driver.c | 38 ++++++++++++++++++++++++++------------
> 1 files changed, 26 insertions(+), 12 deletions(-)
>
> + } else if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
> + vm->def->graphics[0]->data.spice.autoport) {
> + int port = qemudNextFreePort(driver, 5900);
> + int tlsPort = port == -1 ? -1 : qemudNextFreePort(driver, port + 1);
> + if (port < 0 || tlsPort < 0) {
This could be simplified to 'if (tlsPort < 0)', but no big deal.
ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101102/b5de6ca3/attachment-0001.sig>
More information about the libvir-list
mailing list