Blame SOURCES/0040-Ensure-compatibility-with-gtk-vnc-0.7.0.patch

9b8edd
From 75f04c14e49e084e41bdd5491edad8823773a08c Mon Sep 17 00:00:00 2001
9b8edd
From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <github@kempniu.pl>
9b8edd
Date: Tue, 14 Feb 2017 12:42:04 +0100
9b8edd
Subject: [PATCH 40/98] Ensure compatibility with gtk-vnc 0.7.0+
9b8edd
9b8edd
---
9b8edd
 libvncserver/websockets.c | 5 ++++-
9b8edd
 1 file changed, 4 insertions(+), 1 deletion(-)
9b8edd
9b8edd
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
9b8edd
index 72396c2..0b2d46f 100644
9b8edd
--- a/libvncserver/websockets.c
9b8edd
+++ b/libvncserver/websockets.c
9b8edd
@@ -245,7 +245,10 @@ webSocketsCheck (rfbClientPtr cl)
9b8edd
       return FALSE;
9b8edd
     }
9b8edd
 
9b8edd
-    if (strncmp(bbuf, "<", 1) == 0) {
9b8edd
+    if (strncmp(bbuf, "RFB ", 4) == 0) {
9b8edd
+        rfbLog("Normal socket connection\n");
9b8edd
+        return TRUE;
9b8edd
+    } else if (strncmp(bbuf, "<", 1) == 0) {
9b8edd
         rfbLog("Got Flash policy request, sending response\n");
9b8edd
         if (rfbWriteExact(cl, FLASH_POLICY_RESPONSE,
9b8edd
                           SZ_FLASH_POLICY_RESPONSE) < 0) {
9b8edd
-- 
9b8edd
2.9.4
9b8edd