summaryrefslogtreecommitdiffstats
path: root/server/reds.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/reds.c b/server/reds.c
index 5cea11ab..27132ce6 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -91,7 +91,6 @@ SpiceCoreInterface *core = NULL;
static TicketAuthentication taTicket;
-static int spice_secure_port = -1;
static int spice_listen_socket_fd = -1;
static char spice_addr[256];
static int spice_family = PF_UNSPEC;
@@ -2456,8 +2455,8 @@ static int reds_init_net(RedsState *reds)
}
}
- if (spice_secure_port != -1) {
- reds->secure_listen_socket = reds_init_socket(spice_addr, spice_secure_port,
+ if (reds->spice_secure_port != -1) {
+ reds->secure_listen_socket = reds_init_socket(spice_addr, reds->spice_secure_port,
spice_family);
if (-1 == reds->secure_listen_socket) {
return -1;
@@ -3324,6 +3323,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
reds->default_renderer = "sw";
reds->renderers = g_array_sized_new(FALSE, TRUE, sizeof(uint32_t), RED_RENDERER_LAST);
reds->spice_port = -1;
+ reds->spice_secure_port = -1;
return reds;
}
@@ -3526,7 +3526,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_tls(SpiceServer *s, int port,
}
memset(&ssl_parameters, 0, sizeof(ssl_parameters));
- spice_secure_port = port;
+ s->spice_secure_port = port;
g_strlcpy(ssl_parameters.ca_certificate_file, ca_cert_file,
sizeof(ssl_parameters.ca_certificate_file));
g_strlcpy(ssl_parameters.certs_file, certs_file,