mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-08 21:14:11 +00:00
Add RedsState arg to reds_init_client_[ssl_]connection()
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
c141dcb850
commit
3a66b755bd
@ -2267,7 +2267,7 @@ static void reds_handle_ssl_accept(int fd, int event, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static RedLinkInfo *reds_init_client_connection(int socket)
|
static RedLinkInfo *reds_init_client_connection(RedsState *reds, int socket)
|
||||||
{
|
{
|
||||||
RedLinkInfo *link;
|
RedLinkInfo *link;
|
||||||
int delay_val = 1;
|
int delay_val = 1;
|
||||||
@ -2320,12 +2320,12 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static RedLinkInfo *reds_init_client_ssl_connection(int socket)
|
static RedLinkInfo *reds_init_client_ssl_connection(RedsState *reds, int socket)
|
||||||
{
|
{
|
||||||
RedLinkInfo *link;
|
RedLinkInfo *link;
|
||||||
int ssl_status;
|
int ssl_status;
|
||||||
|
|
||||||
link = reds_init_client_connection(socket);
|
link = reds_init_client_connection(reds, socket);
|
||||||
if (link == NULL)
|
if (link == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -2356,6 +2356,7 @@ error:
|
|||||||
|
|
||||||
static void reds_accept_ssl_connection(int fd, int event, void *data)
|
static void reds_accept_ssl_connection(int fd, int event, void *data)
|
||||||
{
|
{
|
||||||
|
RedsState *reds = data;
|
||||||
RedLinkInfo *link;
|
RedLinkInfo *link;
|
||||||
int socket;
|
int socket;
|
||||||
|
|
||||||
@ -2364,7 +2365,7 @@ static void reds_accept_ssl_connection(int fd, int event, void *data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(link = reds_init_client_ssl_connection(socket))) {
|
if (!(link = reds_init_client_ssl_connection(reds, socket))) {
|
||||||
close(socket);
|
close(socket);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2390,7 +2391,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_client(SpiceServer *s, int socket, int s
|
|||||||
RedLinkInfo *link;
|
RedLinkInfo *link;
|
||||||
|
|
||||||
spice_assert(reds == s);
|
spice_assert(reds == s);
|
||||||
if (!(link = reds_init_client_connection(socket))) {
|
if (!(link = reds_init_client_connection(reds, socket))) {
|
||||||
spice_warning("accept failed");
|
spice_warning("accept failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2407,7 +2408,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_ssl_client(SpiceServer *s, int socket, i
|
|||||||
RedLinkInfo *link;
|
RedLinkInfo *link;
|
||||||
|
|
||||||
spice_assert(reds == s);
|
spice_assert(reds == s);
|
||||||
if (!(link = reds_init_client_ssl_connection(socket))) {
|
if (!(link = reds_init_client_ssl_connection(reds, socket))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user