[Spice-commits] Branch 'spice.v13' - spice.c

Gerd Hoffmann kraxel at kemper.freedesktop.org
Thu Jul 15 00:02:43 PDT 2010


 spice.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a17037fc00030a79944fb3e239626524a0f991ef
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Thu Jul 15 09:01:28 2010 +0200

    ifdef new config options.

diff --git a/spice.c b/spice.c
index 201e53c..76e6ac1 100644
--- a/spice.c
+++ b/spice.c
@@ -207,6 +207,7 @@ int mon_spice_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
                                      port, tls_port, subject);
 }
 
+#if defined(SPICE_SERVER_VERSION) && SPICE_SERVER_VERSION >= 0x000503
 static inline spice_wan_compression_t get_wan_compression_value(const char *str)
 {
     if (!strcmp(str, "wan")) {
@@ -223,6 +224,7 @@ static inline spice_wan_compression_t get_wan_compression_value(const char *str)
 
     return SPICE_WAN_COMPRESSION_INVALID;
 }
+#endif
 
 void qemu_spice_init(void)
 {
@@ -235,7 +237,6 @@ void qemu_spice_init(void)
         *x509_cert_file = NULL,
         *x509_cacert_file = NULL;
     int port, tls_port, len;
-    const char *jpeg, *zlib_glz;
 
     if (!opts)
         return;
@@ -301,6 +302,8 @@ void qemu_spice_init(void)
     /* TODO: make configurable via cmdline */
     spice_server_set_image_compression(spice_server, SPICE_IMAGE_COMPRESS_AUTO_GLZ);
 
+#if defined(SPICE_SERVER_VERSION) && SPICE_SERVER_VERSION >= 0x000503
+    const char *jpeg, *zlib_glz;
     jpeg = qemu_opt_get(opts, "jpeg");
     zlib_glz = qemu_opt_get(opts, "zlib-glz");
 
@@ -311,6 +314,7 @@ void qemu_spice_init(void)
     if (zlib_glz) {
         spice_server_set_zlib_glz_compression(spice_server, get_wan_compression_value(zlib_glz));
     }
+#endif
 
     spice_server_init(spice_server, &core_interface);
     using_spice = 1;


More information about the Spice-commits mailing list