summaryrefslogtreecommitdiffstats
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 19:40:36 +0200
commiteda812f0d7fe0a08b3bdce6e95740f97ecaae2d8 (patch)
tree2bb343994007bc694101b8584c6f20fdd1611311
parenta0996e0f70c19b3784cc433021ca7885bc404800 (diff)
downloadspice-eda812f0d7fe0a08b3bdce6e95740f97ecaae2d8.tar.gz
spice-eda812f0d7fe0a08b3bdce6e95740f97ecaae2d8.tar.xz
spice-eda812f0d7fe0a08b3bdce6e95740f97ecaae2d8.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.
-rw-r--r--client/controller.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/client/controller.cpp b/client/controller.cpp
index cf06aa3a..c5722a1e 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