diff options
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/reds.c b/server/reds.c index 10695330..2b6602fa 100644 --- a/server/reds.c +++ b/server/reds.c @@ -91,7 +91,6 @@ SpiceCoreInterface *core = NULL; static TicketAuthentication taTicket; -static int spice_family = PF_UNSPEC; static int sasl_enabled = 0; // sasl disabled by default #if HAVE_SASL static char *sasl_appname = NULL; // default to "spice" if NULL @@ -2440,7 +2439,7 @@ void reds_set_client_mm_time_latency(RedsState *reds, RedClient *client, uint32_ static int reds_init_net(RedsState *reds) { if (reds->spice_port != -1) { - reds->listen_socket = reds_init_socket(reds->spice_addr, reds->spice_port, spice_family); + reds->listen_socket = reds_init_socket(reds->spice_addr, reds->spice_port, reds->spice_family); if (-1 == reds->listen_socket) { return -1; } @@ -2455,7 +2454,7 @@ static int reds_init_net(RedsState *reds) if (reds->spice_secure_port != -1) { reds->secure_listen_socket = reds_init_socket(reds->spice_addr, reds->spice_secure_port, - spice_family); + reds->spice_family); if (-1 == reds->secure_listen_socket) { return -1; } @@ -3323,6 +3322,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void) reds->spice_port = -1; reds->spice_secure_port = -1; reds->spice_listen_socket_fd = -1; + reds->spice_family = PF_UNSPEC; return reds; } @@ -3413,10 +3413,10 @@ SPICE_GNUC_VISIBLE void spice_server_set_addr(SpiceServer *s, const char *addr, spice_assert(reds == s); g_strlcpy(s->spice_addr, addr, sizeof(s->spice_addr)); if (flags & SPICE_ADDR_FLAG_IPV4_ONLY) { - spice_family = PF_INET; + s->spice_family = PF_INET; } if (flags & SPICE_ADDR_FLAG_IPV6_ONLY) { - spice_family = PF_INET6; + s->spice_family = PF_INET6; } } |