[Spice-devel] [PATCH spice-gtk 01/11] controller: use SPICE_XPI_NAMEDPIPE first

Hans de Goede hdegoede at redhat.com
Thu Dec 8 06:19:54 PST 2011


Hi,

Indentation looks of, but that may just be a mail client issue, so: ACK

If the indentation really is wrong, please fix before pushing.

Regards,

Hans


On 12/08/2011 03:12 PM, Marc-André Lureau wrote:
> ---
>   gtk/controller/controller.vala |    7 +++++--
>   1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/gtk/controller/controller.vala b/gtk/controller/controller.vala
> index d635984..af0f800 100644
> --- a/gtk/controller/controller.vala
> +++ b/gtk/controller/controller.vala
> @@ -223,13 +223,16 @@ public class Controller: Object {
>   	{
>   		if (addr == null)
>   #if WIN32
> -			addr = (string*)"\\\\.\\pipe\\SpiceController-%lu".printf (GetCurrentProcessId ());
> +			if (Environment.get_variable ("SPICE_XPI_NAMEDPIPE") != null)
> +				addr = (string*)"%s".printf (Environment.get_variable ("SPICE_XPI_NAMEDPIPE")); // FIXME vala...
> +            else
> +                addr = (string*)"\\\\.\\pipe\\SpiceController-%lu".printf (GetCurrentProcessId ());
>   #else
>   			if (Environment.get_variable ("SPICE_XPI_SOCKET") != null)
>   				addr = (string*)"%s".printf (Environment.get_variable ("SPICE_XPI_SOCKET")); // FIXME vala...
>   #endif
>   		if (addr == null)
> -			throw new SpiceCtrl.Error.VALUE ("Missing SPICE_XPI_SOCKET");
> +			throw new SpiceCtrl.Error.VALUE ("Missing socket or namedpipe address");
>   		FileUtils.unlink (addr);
>
>   #if WIN32


More information about the Spice-devel mailing list