On 04/24/13 01:07, Eric Blake wrote:
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/
I fixed the wording/spelling you pointed out and squashed in the docs
change from the previous patch that was dropped and pushed this patch.
Thanks for the review.
Peter