From: enikey Date: Thu, 25 Dec 2008 09:36:59 +0000 (+0000) Subject: [Refactoring] Member "recordFromBeggining" removed from class RfbProto. Added "rec... X-Git-Tag: v0.0.90~218 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7d017fe7a9e868d6db18db32deeddddfb375737c;p=tigervnc.git [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 --- 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() { diff --git a/java/src/com/tightvnc/vncviewer/VncCanvas.java b/java/src/com/tightvnc/vncviewer/VncCanvas.java index 051928ab..23361c59 100644 --- a/java/src/com/tightvnc/vncviewer/VncCanvas.java +++ b/java/src/com/tightvnc/vncviewer/VncCanvas.java @@ -1281,7 +1281,8 @@ class VncCanvas extends Canvas // public boolean isRecordFromBeginning() { - return rfb.recordFromBeginning; + return false; + //return rfb.recordFromBeginning; } public boolean canWrite() {