summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvncserver/rfbserver.c5
-rw-r--r--libvncserver/websockets.c63
-rw-r--r--rfb/rfb.h1
3 files changed, 0 insertions, 69 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 040238d..116c488 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -1999,11 +1999,6 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
char encBuf[64];
char encBuf2[64];
-#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
- if (cl->wsctx && webSocketCheckDisconnect(cl))
- return;
-#endif
-
if ((n = rfbReadExact(cl, (char *)&msg, 1)) <= 0) {
if (n != 0)
rfbLogPerror("rfbProcessClientNormalMessage: read");
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index ab9cabb..73ad81c 100644
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -96,7 +96,6 @@ struct timeval
#endif
static rfbBool webSocketsHandshake(rfbClientPtr cl, char *scheme);
-void webSocketsGenMd5(char * target, char *key1, char *key2, char *key3);
static int webSocketsEncodeHybi(rfbClientPtr cl, const char *src, int len, char **dst);
@@ -350,56 +349,6 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
return TRUE;
}
-void
-webSocketsGenMd5(char * target, char *key1, char *key2, char *key3)
-{
- unsigned int i, spaces1 = 0, spaces2 = 0;
- unsigned long num1 = 0, num2 = 0;
- unsigned char buf[17];
- struct iovec iov[1];
-
- for (i=0; i < strlen(key1); i++) {
- if (key1[i] == ' ') {
- spaces1 += 1;
- }
- if ((key1[i] >= 48) && (key1[i] <= 57)) {
- num1 = num1 * 10 + (key1[i] - 48);
- }
- }
- num1 = num1 / spaces1;
-
- for (i=0; i < strlen(key2); i++) {
- if (key2[i] == ' ') {
- spaces2 += 1;
- }
- if ((key2[i] >= 48) && (key2[i] <= 57)) {
- num2 = num2 * 10 + (key2[i] - 48);
- }
- }
- num2 = num2 / spaces2;
-
- /* Pack it big-endian */
- buf[0] = (num1 & 0xff000000) >> 24;
- buf[1] = (num1 & 0xff0000) >> 16;
- buf[2] = (num1 & 0xff00) >> 8;
- buf[3] = num1 & 0xff;
-
- buf[4] = (num2 & 0xff000000) >> 24;
- buf[5] = (num2 & 0xff0000) >> 16;
- buf[6] = (num2 & 0xff00) >> 8;
- buf[7] = num2 & 0xff;
-
- strncpy((char *)buf+8, key3, 8);
- buf[16] = '\0';
-
- iov[0].iov_base = buf;
- iov[0].iov_len = 16;
- digestmd5(iov, 1, target);
- target[16] = '\0';
-
- return;
-}
-
static int
ws_read(void *ctxPtr, char *buf, size_t len)
{
@@ -492,18 +441,6 @@ webSocketsDecode(rfbClientPtr cl, char *dst, int len)
return webSocketsDecodeHybi(wsctx, dst, len);
}
-
-/* returns TRUE if client sent a close frame or a single 'end of frame'
- * marker was received, FALSE otherwise
- *
- * Note: This was a Hixie-only hack!
- **/
-rfbBool
-webSocketCheckDisconnect(rfbClientPtr cl)
-{
- return FALSE;
-}
-
/* returns TRUE if there is data waiting to be read in our internal buffer
* or if is there any pending data in the buffer of the SSL implementation
*/
diff --git a/rfb/rfb.h b/rfb/rfb.h
index f982b40..9aace0d 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -763,7 +763,6 @@ extern rfbBool rfbSetNonBlocking(int sock);
/* websockets.c */
extern rfbBool webSocketsCheck(rfbClientPtr cl);
-extern rfbBool webSocketCheckDisconnect(rfbClientPtr cl);
extern int webSocketsEncode(rfbClientPtr cl, const char *src, int len, char **dst);
extern int webSocketsDecode(rfbClientPtr cl, char *dst, int len);
extern rfbBool webSocketsHasDataInBuffer(rfbClientPtr cl);