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