Mercurial > hg > Applications > TreeVNC
changeset 560:bdd659ce8e64
fix null renderer
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2020 11:41:13 +0900 |
parents | 3481a187687f |
children | 52da5806661c |
files | src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java src/main/java/com/glavsoft/rfb/protocol/NullRenderer.java src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java |
diffstat | 3 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Thu Jan 30 23:20:00 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Fri Jan 31 11:41:13 2020 +0900 @@ -255,7 +255,6 @@ private void flushMuticast(TreeRFBProto rfb) { c1.flip(); //System.out.println("multicastPut: " + c1rect + " length: " + (c1.remaining()-c1headerPos-header.limit())); - try { deflater.reset(); LinkedList<ByteBuffer> bufs = new LinkedList<ByteBuffer>(); @@ -265,11 +264,8 @@ for (ByteBuffer buf : bufs) rfb.getViewer().getRfbBroadcastListener().multicastUpdateRectangle(buf); } else { - rfb.multicastqueue.waitput(bufs); + rfb.multicastqueue.put(bufs); } - } catch (InterruptedException e) { - e.printStackTrace(); - } } } @@ -351,6 +347,7 @@ if (rfbProto != null && rfbProto.multicastBlocking) tileloop.multicastPut(rfbProto, true, rect, bytes, offset, 0, 0); } catch (Exception e) { + e.printStackTrace(); if (rfbProto != null && rfbProto.multicastBlocking) tileloop.multicastPut(rfbProto, true, rect, bytes, offset, 0, 0); throw e;
--- a/src/main/java/com/glavsoft/rfb/protocol/NullRenderer.java Thu Jan 30 23:20:00 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/NullRenderer.java Fri Jan 31 11:41:13 2020 +0900 @@ -46,6 +46,11 @@ } @Override + public int getBytesPerCPixel() { + return bytePerPixcel; + } + + @Override public void drawBytes(byte[] bytes, int x, int y, int width, int height) { // TODO Auto-generated method stub
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Thu Jan 30 23:20:00 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Fri Jan 31 11:41:13 2020 +0900 @@ -268,7 +268,8 @@ if (rfb.getCuiVersion()) continue; repaintController.repaintBitmap(rect); } catch (Exception e) { - throw e; + e.printStackTrace(); + break; } } else if (rect.getEncodingType() == EncodingType.RICH_CURSOR) { RichCursorDecoder.getInstance().decode(reader, renderer, rect);