[libvirt] [PATCH 6/7] qemu: Do sensible auto allocation of SPICE port numbers

Eric Blake eblake at redhat.com
Tue Apr 23 23:07:57 UTC 2013


On 04/23/2013 07:46 AM, Peter Krempa wrote:
> With this patch, if the autoport attribute is used, the code will
> sensibly auto allocate the ports only if needed.
> ---
>  src/qemu/qemu_process.c | 66 ++++++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 52 insertions(+), 14 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 20978e0..db80626 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -3275,44 +3275,82 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver,
>                                virQEMUDriverConfigPtr cfg,
>                                virDomainGraphicsDefPtr graphics)
>  {
> -    int ret = -1;
>      unsigned short port = 0;
>      unsigned short tlsPort;
> +    int i;
> +    int defaultMode = graphics->data.spice.defaultMode;
> +
> +    bool needTLSPort = false;
> +    bool needPort = false;
> +
> +    if (graphics->data.spice.autoport) {
> +        /* check if tlsPort or port are needed to be alocated */

s/are needed to be alocated/need allocation/

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130423/54a7c2ec/attachment-0001.sig>


More information about the libvir-list mailing list