[Spice-commits] server/reds.c server/reds-private.h
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Jan 28 08:01:39 PST 2016
server/reds-private.h | 2 ++
server/reds.c | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit b8066339bfd419525e05a28f62bac490cd639d1a
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Thu Jan 22 10:50:18 2015 -0600
Move default_renderer into RedsState
Not global.
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/reds-private.h b/server/reds-private.h
index 9d67427..48de998 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -190,6 +190,8 @@ struct RedsState {
RedsClientMonitorsConfig client_monitors_config;
int mm_time_enabled;
uint32_t mm_time_latency;
+
+ const char *default_renderer;
};
#endif
diff --git a/server/reds.c b/server/reds.c
index feca1db..35442b0 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -154,7 +154,6 @@ static int spice_secure_port = -1;
static int spice_listen_socket_fd = -1;
static char spice_addr[256];
static int spice_family = PF_UNSPEC;
-static const char *default_renderer = "sw";
static int sasl_enabled = 0; // sasl disabled by default
#if HAVE_SASL
static char *sasl_appname = NULL; // default to "spice" if NULL
@@ -3440,6 +3439,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
spice_assert(reds == NULL);
reds = spice_new0(RedsState, 1);
+ reds->default_renderer = "sw";
return reds;
}
@@ -3485,8 +3485,8 @@ SPICE_GNUC_VISIBLE int spice_server_init(SpiceServer *s, SpiceCoreInterface *cor
spice_assert(reds == s);
ret = do_spice_init(s, core);
- if (default_renderer) {
- red_add_renderer(default_renderer);
+ if (s->default_renderer) {
+ red_add_renderer(s->default_renderer);
}
return ret;
}
@@ -3782,7 +3782,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_renderer(SpiceServer *s, const char *nam
if (!red_add_renderer(name)) {
return -1;
}
- default_renderer = NULL;
+ s->default_renderer = NULL;
return 0;
}
More information about the Spice-commits
mailing list