[Spice-devel] [PATCH 2/2] client/server: add missing USE_TUNNEL

Alon Levy alevy at redhat.com
Tue Jan 25 06:58:10 PST 2011


disable some code that only makes sense when USE_TUNNEL is defined
in client and server channel security level setting.
---
 client/application.cpp |    4 ++++
 server/reds.c          |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/client/application.cpp b/client/application.cpp
index 664449d..d1aef1a 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1913,7 +1913,9 @@ bool Application::set_channels_security(CmdLineParser& parser, bool on, char *va
     channels_names["cursor"] = SPICE_CHANNEL_CURSOR;
     channels_names["playback"] = SPICE_CHANNEL_PLAYBACK;
     channels_names["record"] = SPICE_CHANNEL_RECORD;
+#ifdef USE_TUNNEL
     channels_names["tunnel"] = SPICE_CHANNEL_TUNNEL;
+#endif
 #ifdef USE_SMARTCARD
     channels_names["smartcard"] = SPICE_CHANNEL_SMARTCARD;
 #endif
@@ -2075,7 +2077,9 @@ bool Application::set_enable_channels(CmdLineParser& parser, bool enable, char *
     channels_names["cursor"] = SPICE_CHANNEL_CURSOR;
     channels_names["playback"] = SPICE_CHANNEL_PLAYBACK;
     channels_names["record"] = SPICE_CHANNEL_RECORD;
+#ifdef USE_TUNNEL
     channels_names["tunnel"] = SPICE_CHANNEL_TUNNEL;
+#endif
 #ifdef USE_SMARTCARD
     channels_names["smartcard"] = SPICE_CHANNEL_SMARTCARD;
 #endif
diff --git a/server/reds.c b/server/reds.c
index 7535b95..b8ac79b 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3018,7 +3018,9 @@ __visible__ int spice_server_set_channel_security(SpiceServer *s, const char *ch
         [ SPICE_CHANNEL_CURSOR   ] = "cursor",
         [ SPICE_CHANNEL_PLAYBACK ] = "playback",
         [ SPICE_CHANNEL_RECORD   ] = "record",
+#ifdef USE_TUNNEL
         [ SPICE_CHANNEL_TUNNEL   ] = "tunnel",
+#endif
 #ifdef USE_SMARTCARD
         [ SPICE_CHANNEL_SMARTCARD] = "smartcard",
 #endif
-- 
1.7.3.5



More information about the Spice-devel mailing list