summaryrefslogtreecommitdiffstats
path: root/rfbserver.c
diff options
context:
space:
mode:
authordscho <dscho>2002-10-22 08:46:27 +0000
committerdscho <dscho>2002-10-22 08:46:27 +0000
commitaf85e5fee34f7998fe3f06c799b8364a9ddbebce (patch)
tree48cabfc42fb150d2a001042f8974b28b4287f436 /rfbserver.c
parent5a5c22ffc98e4e44f7763256e3683cc390cd260b (diff)
downloadlibvncserver-af85e5fee34f7998fe3f06c799b8364a9ddbebce.zip
libvncserver-af85e5fee34f7998fe3f06c799b8364a9ddbebce.tar.gz
updated to vnc-3.3.4 (ZRLE encoding)
Diffstat (limited to 'rfbserver.c')
-rw-r--r--rfbserver.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/rfbserver.c b/rfbserver.c
index 7ba360e..51769be 100644
--- a/rfbserver.c
+++ b/rfbserver.c
@@ -3,6 +3,7 @@
*/
/*
+ * Copyright (C) 2002 RealVNC Ltd.
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
* All Rights Reserved.
@@ -257,6 +258,7 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUDP)
cl->preferredEncoding = rfbEncodingRaw;
cl->correMaxWidth = 48;
cl->correMaxHeight = 48;
+ cl->zrleData = 0;
cl->copyRegion = sraRgnCreate();
cl->copyDX = 0;
@@ -372,6 +374,10 @@ rfbClientConnectionGone(cl)
if (cl->next)
cl->next->prev = cl->prev;
+#ifdef HAVE_ZRLE
+ FreeZrleData(cl);
+#endif
+
#ifdef HAVE_PTHREADS
LOCK(cl->refCountMutex);
if(cl->refCount) {
@@ -787,6 +793,15 @@ rfbProcessClientNormalMessage(cl)
}
break;
#endif
+#ifdef HAVE_ZRLE
+ case rfbEncodingZRLE:
+ if (cl->preferredEncoding == -1) {
+ cl->preferredEncoding = enc;
+ rfbLog("Using ZRLE encoding for client %s\n",
+ cl->host);
+ }
+ break;
+#endif
default:
if ( enc >= (CARD32)rfbEncodingCompressLevel0 &&
enc <= (CARD32)rfbEncodingCompressLevel9 ) {
@@ -1187,6 +1202,14 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
return FALSE;
}
break;
+#ifdef HAVE_ZRLE
+ case rfbEncodingZRLE:
+ if (!rfbSendRectEncodingZRLE(cl, x, y, w, h)) {
+ sraRgnDestroy(updateRegion);
+ return FALSE;
+ }
+ break;
+#endif
}
}
sraRgnReleaseIterator(i);
OpenPOWER on IntegriCloud