Merge remote-tracking branch 'origin/master'
This commit is contained in:
		@@ -13,9 +13,10 @@ public class MessageBlock {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void reset() {
 | 
					    public void reset() {
 | 
				
			||||||
        int id = getId();
 | 
					        file.setMemory(mapAddress(64), getPayloadSize(), (byte) 0x00);
 | 
				
			||||||
        file.setMemory(baseOffset, size, (byte) 0x00);
 | 
					        updateTimestamp();
 | 
				
			||||||
        putInt(0, id);
 | 
					        putInt(12, 0);
 | 
				
			||||||
 | 
					        putInt(16, 0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public int getId() {
 | 
					    public int getId() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,7 +52,7 @@ public class TabooIpcClientImpl implements TabooIpcClient {
 | 
				
			|||||||
    public boolean readMessage(byte[] buf) {
 | 
					    public boolean readMessage(byte[] buf) {
 | 
				
			||||||
        if (!available) throw new IllegalStateException();
 | 
					        if (!available) throw new IllegalStateException();
 | 
				
			||||||
        if (this.block.getInt(16) == 2) {
 | 
					        if (this.block.getInt(16) == 2) {
 | 
				
			||||||
            this.block.getBytes(64, buf, 0, (int) this.block.getPayloadSize());
 | 
					            this.block.getBytes(64, buf, 0, Math.min((int) this.block.getPayloadSize(), buf.length));
 | 
				
			||||||
            return this.block.compareAndSwapInt(16, 2, 0);
 | 
					            return this.block.compareAndSwapInt(16, 2, 0);
 | 
				
			||||||
        } else return false;
 | 
					        } else return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user