[Spice-commits] server/reds.c server/reds.h server/reds-private.h server/red-worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Feb 3 15:15:32 UTC 2016
server/red-worker.c | 2 +-
server/reds-private.h | 1 +
server/reds.c | 9 +++++++--
server/reds.h | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 5a8ccd1ac77336272c7f8cee77da10b718b07191
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Tue Jan 27 14:17:28 2015 -0600
Move zlib_glz_state to RedsState struct
Also required adding reds_get_zlib_glz_state() for external access.
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/red-worker.c b/server/red-worker.c
index f6c4f45..f874939 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -1508,7 +1508,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher)
worker->image_compression = spice_server_get_image_compression(reds);
worker->jpeg_state = reds_get_jpeg_state(reds);
- worker->zlib_glz_state = zlib_glz_state;
+ worker->zlib_glz_state = reds_get_zlib_glz_state(reds);
worker->driver_cap_monitors_config = 0;
#ifdef RED_STATISTICS
char worker_str[20];
diff --git a/server/reds-private.h b/server/reds-private.h
index 197c89c..6a18c1b 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -217,6 +217,7 @@ struct RedsState {
gboolean ticketing_enabled;
SpiceImageCompression image_compression;
spice_wan_compression_t jpeg_state;
+ spice_wan_compression_t zlib_glz_state;
gboolean agent_copypaste;
gboolean agent_file_xfer;
diff --git a/server/reds.c b/server/reds.c
index 73df8e4..e8d5392 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -147,7 +147,6 @@ static SpiceCoreInterfaceInternal core_interface_adapter = {
static pthread_mutex_t *lock_cs;
static long *lock_count;
uint32_t streaming_video = SPICE_STREAM_VIDEO_FILTER;
-spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
int agent_mouse = TRUE;
RedsState *reds = NULL;
@@ -3426,6 +3425,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
reds->ticketing_enabled = TRUE; /* ticketing enabled by default */
reds->image_compression = SPICE_IMAGE_COMPRESSION_AUTO_GLZ;
reds->jpeg_state = SPICE_WAN_COMPRESSION_AUTO;
+ reds->zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
reds->agent_copypaste = TRUE;
reds->agent_file_xfer = TRUE;
reds->exit_on_disconnect = FALSE;
@@ -3705,7 +3705,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_zlib_glz_compression(SpiceServer *s, spi
return -1;
}
// todo: support dynamically changing the state
- zlib_glz_state = comp;
+ s->zlib_glz_state = comp;
return 0;
}
@@ -4020,3 +4020,8 @@ spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds)
{
return reds->jpeg_state;
}
+
+spice_wan_compression_t reds_get_zlib_glz_state(const RedsState *reds)
+{
+ return reds->zlib_glz_state;
+}
diff --git a/server/reds.h b/server/reds.h
index 0cc6ec7..35a7fec 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -75,7 +75,6 @@ extern uint32_t num_renderers;
extern struct SpiceCoreInterfaceInternal *core;
extern uint32_t streaming_video;
-extern spice_wan_compression_t zlib_glz_state;
// Temporary measures to make splitting reds.c to inputs-channel.c easier
@@ -113,5 +112,6 @@ void reds_on_char_device_state_destroy(RedsState *reds, SpiceCharDeviceState *de
void reds_set_client_mm_time_latency(RedsState *reds, RedClient *client, uint32_t latency);
spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds);
+spice_wan_compression_t reds_get_zlib_glz_state(const RedsState *reds);
#endif
More information about the Spice-commits
mailing list