aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/TramigoFrameDecoder.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TramigoFrameDecoder.java b/src/org/traccar/protocol/TramigoFrameDecoder.java
index 5b3f41078..f6dde4298 100644
--- a/src/org/traccar/protocol/TramigoFrameDecoder.java
+++ b/src/org/traccar/protocol/TramigoFrameDecoder.java
@@ -44,10 +44,16 @@ public class TramigoFrameDecoder extends LengthFieldBasedFrameDecoder {
int length = buf.readableBytes();
byte bytes[] = new byte[length];
buf.getBytes(buf.readerIndex(), bytes);
- buf = ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, bytes);
+
+ ChannelBuffer result = (ChannelBuffer) super.decode(
+ ctx, channel, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, bytes));
+ if (result != null) {
+ buf.skipBytes(result.readableBytes());
+ }
+ return result;
}
- return decode(ctx, channel, buf);
+ return super.decode(ctx, channel, buf);
}
}