[Spice-devel] [PATCH] reds: remove default_renderer as field
Frediano Ziglio
fziglio at redhat.com
Mon Feb 1 14:53:03 CET 2016
Was used to just assure there was at least one renderer in the list.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/reds-private.h | 2 --
server/reds.c | 8 ++++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/server/reds-private.h b/server/reds-private.h
index 427ce8e..df3f244 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -191,8 +191,6 @@ struct RedsState {
int mm_time_enabled;
uint32_t mm_time_latency;
- const char *default_renderer;
-
int spice_port;
int spice_secure_port;
};
diff --git a/server/reds.c b/server/reds.c
index 9e56780..dbf0976 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3430,6 +3430,8 @@ err:
return -1;
}
+static const char default_renderer[] = "sw";
+
/* new interface */
SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
{
@@ -3437,7 +3439,6 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
spice_assert(reds == NULL);
reds = spice_new0(RedsState, 1);
- reds->default_renderer = "sw";
reds->spice_port = -1;
reds->spice_secure_port = -1;
return reds;
@@ -3485,8 +3486,8 @@ SPICE_GNUC_VISIBLE int spice_server_init(SpiceServer *s, SpiceCoreInterface *cor
spice_assert(reds == s);
ret = do_spice_init(s, core);
- if (s->default_renderer) {
- red_add_renderer(s->default_renderer);
+ if (num_renderers == 0) {
+ red_add_renderer(default_renderer);
}
return ret;
}
@@ -3782,7 +3783,6 @@ SPICE_GNUC_VISIBLE int spice_server_add_renderer(SpiceServer *s, const char *nam
if (!red_add_renderer(name)) {
return -1;
}
- s->default_renderer = NULL;
return 0;
}
--
2.4.3
More information about the Spice-devel
mailing list