From 94d058b35f075cec2d6e8b6e37ee1a94086ea3f8 Mon Sep 17 00:00:00 2001 From: runge Date: Thu, 21 May 2009 10:57:03 -0400 Subject: Thread safety. Fix -clip -in -rawfb. Try to avoid Xorg stuck key bug. --- x11vnc/sslhelper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'x11vnc/sslhelper.c') diff --git a/x11vnc/sslhelper.c b/x11vnc/sslhelper.c index 6b49d47..39ab41c 100644 --- a/x11vnc/sslhelper.c +++ b/x11vnc/sslhelper.c @@ -2565,7 +2565,7 @@ void accept_openssl(int mode, int presock) { return; } - client = rfbNewClient(screen, vsock); + client = create_new_client(vsock, 0); openssl_last_helper_pid = 0; if (client) { @@ -2585,12 +2585,16 @@ void accept_openssl(int mode, int presock) { client->protocolMinorVersion = 8; if (!finish_vencrypt_auth(client, vencrypt_sel)) { rfbCloseClient(client); + client = NULL; } } else if (anontls_sel != 0) { client->protocolMajorVersion = 3; client->protocolMinorVersion = 8; rfbAuthNewClient(client); } + if (use_threads && client != NULL) { + rfbStartOnHoldClient(client); + } /* try to get RFB proto done now. */ progress_client(); } else { -- cgit v1.2.3