aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/rfb/ConnParams.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/tigervnc/rfb/ConnParams.java')
-rw-r--r--java/com/tigervnc/rfb/ConnParams.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/java/com/tigervnc/rfb/ConnParams.java b/java/com/tigervnc/rfb/ConnParams.java
index 08037231..3ea0496f 100644
--- a/java/com/tigervnc/rfb/ConnParams.java
+++ b/java/com/tigervnc/rfb/ConnParams.java
@@ -43,20 +43,20 @@ public class ConnParams {
setName("");
}
- public boolean readVersion(InStream is, Boolean done)
+ public boolean readVersion(InStream is)
{
+ done = false;
if (verStrPos >= 12) return false;
verStr = new StringBuilder(13);
- is.check(12);
- while (verStrPos < 12) {
+ while (is.checkNoWait(1) && verStrPos < 12) {
verStr.insert(verStrPos++,(char)is.readU8());
}
if (verStrPos < 12) {
- done = Boolean.valueOf(false);
+ done = false;
return true;
}
- done = Boolean.valueOf(true);
+ done = true;
verStr.insert(12,'0');
verStrPos = 0;
if (verStr.toString().matches("RFB \\d{3}\\.\\d{3}\\n0")) {
@@ -181,6 +181,7 @@ public class ConnParams {
}
}
}
+ public boolean done;
public boolean useCopyRect;
public boolean supportsLocalCursor;