summaryrefslogtreecommitdiff
path: root/server/reds.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-01-27 13:45:04 -0600
committerFrediano Ziglio <fziglio@redhat.com>2016-02-01 15:20:54 +0000
commita826bcad4ebf0a48436d85507b99fdd115ab771b (patch)
tree9b80e13e6f9226865ae70cd6a281f43b2f13e9e1 /server/reds.c
parentfdcd8980ce100cbdd32e069dbb0eadda8c7486ad (diff)
Move spice_name to RedsState struct
Remove more global variables Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/reds.c b/server/reds.c
index 9a4ea3ed..5708efe1 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -144,7 +144,6 @@ static SpiceCoreInterfaceInternal core_interface_adapter = {
#define REDS_TOKENS_TO_SEND 5
#define REDS_VDI_PORT_NUM_RECEIVE_BUFFS 5
-static char *spice_name = NULL;
static bool spice_uuid_is_set = FALSE;
static uint8_t spice_uuid[16] = { 0, };
@@ -1704,8 +1703,8 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
reds->mouse_mode, reds->is_client_mouse_allowed,
reds_get_mm_time() - MM_TIME_DELTA,
red_dispatcher_qxl_ram_size());
- if (spice_name)
- main_channel_push_name(mcc, spice_name);
+ if (reds->spice_name)
+ main_channel_push_name(mcc, reds->spice_name);
if (spice_uuid_is_set)
main_channel_push_uuid(mcc, spice_uuid);
} else {
@@ -3586,8 +3585,8 @@ SPICE_GNUC_VISIBLE int spice_server_set_sasl_appname(SpiceServer *s, const char
SPICE_GNUC_VISIBLE void spice_server_set_name(SpiceServer *s, const char *name)
{
- free(spice_name);
- spice_name = spice_strdup(name);
+ free(s->spice_name);
+ s->spice_name = spice_strdup(name);
}
SPICE_GNUC_VISIBLE void spice_server_set_uuid(SpiceServer *s, const uint8_t uuid[16])