reds: Make sure accept_ssl_connection() gets a reds instance

Commit 3a66b75 changed reds_accept_ssl_connection() to expect a RedState
instance when its called, but the core->watch_add() which is calling it
was not changed accordingly. This causes a crash when connecting through
SSL.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Christophe Fergeau 2016-02-10 17:57:39 +01:00 committed by Frediano Ziglio
parent 8777864311
commit 3fa733a800

View File

@ -2552,7 +2552,7 @@ static int reds_init_net(RedsState *reds)
}
reds->secure_listen_watch = core->watch_add(core, reds->secure_listen_socket,
SPICE_WATCH_EVENT_READ,
reds_accept_ssl_connection, NULL);
reds_accept_ssl_connection, reds);
if (reds->secure_listen_watch == NULL) {
spice_warning("set fd handle failed");
return -1;