summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-07-08 19:35:48 +0200
committerAlexander Larsson <alexl@redhat.com>2010-07-08 22:25:28 +0200
commit633e962ac35f0cb0281bba4b22b88ff78cd76d80 (patch)
treeb84ea2c450a9bb7d83593afdbd9e61d1dc5ee4c7
parentceff16cad6a9191d634b83b2914096e7564924e7 (diff)
downloadspice-633e962ac35f0cb0281bba4b22b88ff78cd76d80.tar.gz
spice-633e962ac35f0cb0281bba4b22b88ff78cd76d80.tar.xz
spice-633e962ac35f0cb0281bba4b22b88ff78cd76d80.zip
Make tunnel support optional in client too
-rw-r--r--client/application.cpp4
-rw-r--r--client/x11/Makefile.am15
-rw-r--r--configure.ac3
-rw-r--r--server/reds.c6
4 files changed, 23 insertions, 5 deletions
diff --git a/client/application.cpp b/client/application.cpp
index 72db03f2..af37ae02 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -40,7 +40,9 @@
#include "quic.h"
#include "mutex.h"
#include "cmd_line_parser.h"
+#ifdef USE_TUNNEL
#include "tunnel_channel.h"
+#endif
#include "rect.h"
#ifdef USE_GUI
#include "gui/gui.h"
@@ -1922,9 +1924,11 @@ void Application::register_channels()
_client.register_channel_factory(RecordChannel::Factory());
}
+#ifdef USE_TUNNEL
if (_enabled_channels[SPICE_CHANNEL_TUNNEL]) {
_client.register_channel_factory(TunnelChannel::Factory());
}
+#endif
}
bool Application::process_cmd_line(int argc, char** argv)
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index dc83f58c..101f6ddf 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -109,8 +109,6 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/hot_keys.cpp \
$(CLIENT_DIR)/hot_keys.h \
$(CLIENT_DIR)/threads.cpp \
- $(CLIENT_DIR)/tunnel_channel.cpp \
- $(CLIENT_DIR)/tunnel_channel.h \
$(CLIENT_DIR)/utils.cpp \
$(CLIENT_DIR)/utils.h \
$(CLIENT_DIR)/zlib_decoder.cpp \
@@ -118,6 +116,15 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/icon.h \
$(NULL)
+if SUPPORT_TUNNEL
+RED_TUNNEL_SRCS = \
+ $(CLIENT_DIR)/tunnel_channel.cpp \
+ $(CLIENT_DIR)/tunnel_channel.h \
+ $(NULL)
+else
+RED_TUNNEL_SRCS =
+endif
+
if SUPPORT_GUI
RED_GUI_SRCS = \
$(CLIENT_DIR)/gui/softrenderer.h \
@@ -127,7 +134,8 @@ RED_GUI_SRCS = \
$(CLIENT_DIR)/gui/resource_provider.h \
$(CLIENT_DIR)/gui/resource_provider.cpp \
$(CLIENT_DIR)/gui/gui.h \
- $(CLIENT_DIR)/gui/gui.cpp
+ $(CLIENT_DIR)/gui/gui.cpp \
+ $(NULL)
else
RED_GUI_SRCS =
endif
@@ -176,6 +184,7 @@ spicec_SOURCES = \
x_platform.h \
$(RED_COMMON_SRCS) \
$(RED_GUI_SRCS) \
+ $(RED_TUNNEL_SRCS) \
$(RED_OGL_SRCS) \
$(NULL)
diff --git a/configure.ac b/configure.ac
index 03529d09..80332526 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,6 +96,9 @@ AC_ARG_ENABLE(tunnel,
[ --enable-tunnel Enable network redirection],
[ have_tunnel=yes])
AM_CONDITIONAL(SUPPORT_TUNNEL, test "x$have_tunnel" = "xyes")
+if test "x$have_tunnel" = "xyes"; then
+ AC_DEFINE(USE_TUNNEL, [1], [Define if supporting tunnel proxying])
+fi
use_gui=no
AC_ARG_ENABLE(gui,
diff --git a/server/reds.c b/server/reds.c
index 1a227aeb..df82f19a 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -55,7 +55,7 @@
#include "demarshallers.h"
#include "marshaller.h"
#include "generated_marshallers.h"
-#ifdef HAVE_SLIRP
+#ifdef USE_TUNNEL
#include "red_tunnel_worker.h"
#endif
@@ -92,7 +92,9 @@ static pthread_mutex_t *lock_cs;
static long *lock_count;
uint32_t streaming_video = STREAM_VIDEO_FILTER;
spice_image_compression_t image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
+#ifdef USE_TUNNEL
void *red_tunnel = NULL;
+#endif
int agent_mouse = TRUE;
static void openssl_init();
@@ -3456,7 +3458,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
attach_to_red_agent(SPICE_CONTAINEROF(sin, SpiceVDIPortInstance, base));
} else if (strcmp(interface->type, SPICE_INTERFACE_NET_WIRE) == 0) {
-#ifdef HAVE_SLIRP
+#ifdef USE_TUNNEL
SpiceNetWireInstance *net;
red_printf("SPICE_INTERFACE_NET_WIRE");
if (red_tunnel) {