diff options
author | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-25 09:36:59 +0000 |
---|---|---|
committer | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-25 09:36:59 +0000 |
commit | 7d017fe7a9e868d6db18db32deeddddfb375737c (patch) | |
tree | ab2da0db021615743940f3cd88a5008da8402b50 /java/src/com/tightvnc/vncviewer/RfbProto.java | |
parent | 3f1c2d83b9be15af8831c952dae8cfbbabda9ea6 (diff) | |
download | tigervnc-7d017fe7a9e868d6db18db32deeddddfb375737c.tar.gz tigervnc-7d017fe7a9e868d6db18db32deeddddfb375737c.zip |
[Refactoring] Member "recordFromBeggining" removed from class RfbProto. Added "rec != null" test to tight decoder record methods that located in RfbProto class. Method "isRecordFromBeggining" of class VncCanvas always returns false.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3466 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/src/com/tightvnc/vncviewer/RfbProto.java')
-rw-r--r-- | java/src/com/tightvnc/vncviewer/RfbProto.java | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/java/src/com/tightvnc/vncviewer/RfbProto.java b/java/src/com/tightvnc/vncviewer/RfbProto.java index 5731bf0a..51532531 100644 --- a/java/src/com/tightvnc/vncviewer/RfbProto.java +++ b/java/src/com/tightvnc/vncviewer/RfbProto.java @@ -184,11 +184,6 @@ class RfbProto { // containing Zlib-, ZRLE- or Tight-encoded data. boolean wereZlibUpdates = false; - // This will be set to false if the startSession() was called after - // we have received at least one Zlib-, ZRLE- or Tight-encoded - // framebuffer update. - boolean recordFromBeginning = true; - // This fields are needed to show warnings about inefficiently saved // sessions only once per each saved session file. boolean zlibWarningShown; @@ -689,8 +684,6 @@ class RfbProto { // we should maintain separate flags for Zlib, ZRLE and // Tight, instead of one ``wereZlibUpdates'' variable. // - if (wereZlibUpdates) - recordFromBeginning = false; zlibWarningShown = false; tightWarningShown = false; @@ -880,10 +873,6 @@ class RfbProto { } } - if (rec != null && recordFromBeginning) - for (int i = 0; i < byteCount; i++) - rec.writeByte(portion[i]); - return len; } @@ -1431,7 +1420,7 @@ class RfbProto { deflater.finish(); int compressedSize = deflater.deflate(buf); recordCompactLen(compressedSize); - rec.write(buf, 0, compressedSize); + if (rec != null) rec.write(buf, 0, compressedSize); } void recordCompressedData(byte[] data) throws IOException { @@ -1456,7 +1445,7 @@ class RfbProto { buf[bytes++] = (byte)(len >> 14 & 0xFF); } } - rec.write(buf, 0, bytes); + if (rec != null) rec.write(buf, 0, bytes); } public void startTiming() { |