From: Jonathon Jongsma <jjongsma@xxxxxxxxxx> Not global. --- server/reds-private.h | 1 + server/reds.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/reds-private.h b/server/reds-private.h index 63e856e..75a4f59 100644 --- a/server/reds-private.h +++ b/server/reds-private.h @@ -195,6 +195,7 @@ struct RedsState { int default_channel_security; ChannelSecurityOptions *channels_security; + const char *default_renderer; }; #endif diff --git a/server/reds.c b/server/reds.c index 5804d13..f35b602 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 @@ -3444,6 +3443,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void) reds = spice_new0(RedsState, 1); reds->default_channel_security = SPICE_CHANNEL_SECURITY_NONE | SPICE_CHANNEL_SECURITY_SSL; + reds->default_renderer = "sw"; return reds; } @@ -3489,8 +3489,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; } @@ -3784,7 +3784,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; } -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel