Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 243:0ed7719c1800
fix serial number option.
author | oc |
---|---|
date | Mon, 13 Oct 2014 17:39:36 +0900 |
parents | a640cd7001e1 |
children | 8cc07511b1d5 |
files | src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Oct 13 17:23:57 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Oct 13 17:39:36 2014 +0900 @@ -315,9 +315,12 @@ private void getLost(Reader reader) throws Exception { int addSerialNumFlag = reader.readInt32(); long num = reader.readInt64(); - if(num != ++checkCounter) { - System.out.println("LostData" + (num - checkCounter)); - checkCounter = num; + if (addSerialNumFlag == 1) { + rfb.setAddSerialNum(true); + if(num != ++checkCounter) { + System.out.println("LostData" + (num - checkCounter)); + checkCounter = num; + } } } }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Mon Oct 13 17:23:57 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Mon Oct 13 17:39:36 2014 +0900 @@ -442,7 +442,11 @@ public void addSerialNumber(LinkedList<ByteBuffer> bufs) { ByteBuffer serialNum = multicastqueue.allocate(4+8); // addSerialNum flag + SerialNum - serialNum.putInt(1); + if (this.addSerialNum) { + serialNum.putInt(1); + } else { + serialNum.putInt(0); + } serialNum.putLong(counter++); serialNum.flip(); bufs.addFirst(serialNum);