summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2011-03-01 17:58:47 +0200
committerHans de Goede <hdegoede@redhat.com>2011-03-01 17:58:47 +0200
commite9ee6cf914a206a7ecc3b378e2360e6b0a0b61cc (patch)
tree0de557726acbc07df4fae709d3d3117286066f3a /client
parent0c88a60eccf1d30940a38bb79158e3a869e6b01f (diff)
downloadspice-e9ee6cf914a206a7ecc3b378e2360e6b0a0b61cc.tar.gz
spice-e9ee6cf914a206a7ecc3b378e2360e6b0a0b61cc.tar.xz
spice-e9ee6cf914a206a7ecc3b378e2360e6b0a0b61cc.zip
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')
-rw-r--r--client/controller.cpp1
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