diff options
author | Uri Lublin <uril@redhat.com> | 2011-03-01 17:58:47 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2011-03-01 17:58:47 +0200 |
commit | e9ee6cf914a206a7ecc3b378e2360e6b0a0b61cc (patch) | |
tree | 0de557726acbc07df4fae709d3d3117286066f3a /client/controller.cpp | |
parent | 0c88a60eccf1d30940a38bb79158e3a869e6b01f (diff) |
client: exit nicely for --controller with no SPICE_XPI_SOCKET (rhbz#644292)
When starting spicec with --controller, SPICE_XPI_SOCKET environment
variable must be defined so spicec and the controller can be connected.
Diffstat (limited to 'client/controller.cpp')
-rw-r--r-- | client/controller.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/controller.cpp b/client/controller.cpp index 329c1336..476d22e3 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)"); + throw Exception("Failed to get a controller connection (SPICE_XPI_SOCKET)"); } strncpy(pipe_name, p_socket, sizeof(pipe_name)); #endif |