[Spice-devel] [spice-server 1/2] reds: Make sure accept_ssl_connection() gets a reds instance

Christophe Fergeau cfergeau at redhat.com
Wed Feb 10 16:57:39 UTC 2016


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.
---
 server/reds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index a46c194..4fba4f1 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -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;
-- 
2.5.0



More information about the Spice-devel mailing list