[Spice-devel] [PATCH] client: exit nicely for --controller with no SPICE_XPI_SOCKET (#644292)

Arnon Gilboa agilboa at redhat.com
Tue Mar 1 07:43:22 PST 2011


Uri Lublin wrote:
> When starting spicec with --controller, SPICE_XPI_SOCKET environment
> variable must be defined so spicec and the controller can be connected.
> ---
>  client/controller.cpp |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/client/controller.cpp b/client/controller.cpp
> index 329c133..476d22e 100644
> --- a/client/controller.cpp
> +++ b/client/controller.cpp
> @@ -44,6 +44,7 @@ Controller::Controller(ControllerInterface *handler)
>      char *p_socket = getenv("SPICE_XPI_SOCKET");
>      if (!p_socket) {
>          LOG_ERROR("Failed to get a controller connection (SPICE_XPI_SOCKET)");
>   
why do we need both log_error & exception? won't the exception be logged 
anyway?
> +        throw Exception("Failed to get a controller connection (SPICE_XPI_SOCKET)");
>      }
>      strncpy(pipe_name, p_socket, sizeof(pipe_name));
>  #endif
>   



More information about the Spice-devel mailing list