aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/TightDecoder.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-11-11 13:11:09 +0100
committerPierre Ossman <ossman@cendio.se>2015-11-27 11:00:55 +0100
commit6f318e4451fcb45054408eaf568ca1c30c2d1ab6 (patch)
tree733597f9656ed8b586c0ba23ebb57aa8f7ecc8c2 /common/rfb/TightDecoder.cxx
parent80b4209b547f030dad14b2ce9456b2a4220b9a65 (diff)
downloadtigervnc-6f318e4451fcb45054408eaf568ca1c30c2d1ab6.tar.gz
tigervnc-6f318e4451fcb45054408eaf568ca1c30c2d1ab6.zip
Clear up ZlibInStream::reset() behaviour
It previously only did a reset of the ZlibInStream object, not the underlying zlib stream. It also had the side effect of flushing the underlying stream and disassociating from it. Clear things up by changing the naming, and introducing a proper reset function (which is needed by the Tight decoder).
Diffstat (limited to 'common/rfb/TightDecoder.cxx')
-rw-r--r--common/rfb/TightDecoder.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index cab49fdf..1bfa7a9f 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -165,7 +165,7 @@ void TightDecoder::decodeRect(const Rect& r, const void* buffer,
bufptr += 1;
buflen -= 1;
- // Flush zlib streams if we are told by the server to do so.
+ // Reset zlib streams if we are told by the server to do so.
for (int i = 0; i < 4; i++) {
if (comp_ctl & 1) {
zis[i].reset();
@@ -309,8 +309,8 @@ void TightDecoder::decodeRect(const Rect& r, const void* buffer,
netbuf = new rdr::U8[dataSize];
zis[streamId].readBytes(netbuf, dataSize);
- zis[streamId].reset();
+ zis[streamId].removeUnderlying();
delete ms;
bufptr = netbuf;