diff options
| author | Christian Beier <dontmind@freeshell.org> | 2011-03-28 15:13:29 +0200 |
|---|---|---|
| committer | Christian Beier <dontmind@freeshell.org> | 2011-03-28 15:13:29 +0200 |
| commit | 471baea920773e3080b7972b93dbe091ebe3b4e0 (patch) | |
| tree | f29897c140230af1ce95943baa18b89d664b8ba3 /libvncserver | |
| parent | 64daa71ede302d4d0ba4174b3dcec49bf2588111 (diff) | |
| parent | 62b7acf48009cfad1a54bd8ba04b662f9ac53c80 (diff) | |
| download | libtdevnc-471baea920773e3080b7972b93dbe091ebe3b4e0.tar.gz libtdevnc-471baea920773e3080b7972b93dbe091ebe3b4e0.zip | |
Merge branch 'master' of ssh://libvncserver.git.sourceforge.net/gitroot/libvncserver/libvncserver
Diffstat (limited to 'libvncserver')
| -rw-r--r-- | libvncserver/rfbserver.c | 4 | ||||
| -rw-r--r-- | libvncserver/ultra.c | 6 | ||||
| -rw-r--r-- | libvncserver/zrle.c | 3 | ||||
| -rw-r--r-- | libvncserver/zrleencodetemplate.c | 6 |
4 files changed, 5 insertions, 14 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 73be34c..70ae88b 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -1657,7 +1657,7 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con #ifdef LIBVNCSERVER_HAVE_LIBZ /* compressed packet */ nRet = uncompress(compBuff,&nRawBytes,(const unsigned char*)buffer, length); - retval=write(cl->fileTransfer.fd, compBuff, nRawBytes); + retval=write(cl->fileTransfer.fd, (char*)compBuff, nRawBytes); #else /* Write the file out as received... */ retval=write(cl->fileTransfer.fd, buffer, length); @@ -3265,7 +3265,7 @@ void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen, int sock) { - if (write(sock, &ptrAcceleration, 1) < 0) { + if (write(sock, (char*) &ptrAcceleration, 1) < 0) { rfbLogPerror("rfbNewUDPConnection: write"); } } diff --git a/libvncserver/ultra.c b/libvncserver/ultra.c index 9a3b14f..9485591 100644 --- a/libvncserver/ultra.c +++ b/libvncserver/ultra.c @@ -50,7 +50,7 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl, + (x * (cl->scaledScreen->bitsPerPixel / 8))); int maxRawSize; - int maxCompSize; + lzo_uint maxCompSize; maxRawSize = (w * h * (cl->format.bitsPerPixel / 8)); @@ -68,7 +68,7 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl, */ maxCompSize = (maxRawSize + maxRawSize / 16 + 64 + 3); - if (cl->afterEncBufSize < maxCompSize) { + if (cl->afterEncBufSize < (int)maxCompSize) { cl->afterEncBufSize = maxCompSize; if (cl->afterEncBuf == NULL) cl->afterEncBuf = (char *)malloc(cl->afterEncBufSize); @@ -92,7 +92,7 @@ rfbSendOneRectEncodingUltra(rfbClientPtr cl, } /* Perform the compression here. */ - deflateResult = lzo1x_1_compress((unsigned char *)cl->beforeEncBuf, (lzo_uint)(w * h * (cl->format.bitsPerPixel / 8)), (unsigned char *)cl->afterEncBuf, (lzo_uint *)&maxCompSize, cl->lzoWrkMem); + deflateResult = lzo1x_1_compress((unsigned char *)cl->beforeEncBuf, (lzo_uint)(w * h * (cl->format.bitsPerPixel / 8)), (unsigned char *)cl->afterEncBuf, &maxCompSize, cl->lzoWrkMem); /* maxCompSize now contains the compressed size */ /* Find the total size of the resulting compressed data. */ diff --git a/libvncserver/zrle.c b/libvncserver/zrle.c index e1f1447..80f629c 100644 --- a/libvncserver/zrle.c +++ b/libvncserver/zrle.c @@ -96,9 +96,6 @@ * data. */ -/* TODO: put into rfbClient struct */ - -static char zrleBeforeBuf[rfbZRLETileWidth * rfbZRLETileHeight * 4 + 4]; /* * rfbSendRectEncodingZRLE - send a given rectangle using ZRLE encoding. diff --git a/libvncserver/zrleencodetemplate.c b/libvncserver/zrleencodetemplate.c index 3a6f117..b6de755 100644 --- a/libvncserver/zrleencodetemplate.c +++ b/libvncserver/zrleencodetemplate.c @@ -84,8 +84,6 @@ static const int bitsPerPackedPixel[] = { 0, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; -static zrlePaletteHelper paletteHelper; - #endif /* ZRLE_ONCE */ void ZRLE_ENCODE_TILE (PIXEL_T* data, int w, int h, zrleOutStream* os, @@ -144,11 +142,7 @@ void ZRLE_ENCODE_TILE(PIXEL_T* data, int w, int h, zrleOutStream* os, PIXEL_T* end = ptr + h * w; *end = ~*(end-1); /* one past the end is different so the while loop ends */ -#if 0 - ph = &paletteHelper; -#else ph = (zrlePaletteHelper *) paletteHelper; -#endif zrlePaletteHelperInit(ph); while (ptr < end) { |
