diff options
Diffstat (limited to 'src/org/traccar/protocol/EgtsFrameDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/EgtsFrameDecoder.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/EgtsFrameDecoder.java b/src/org/traccar/protocol/EgtsFrameDecoder.java index 71ffc1811..c85eeff00 100644 --- a/src/org/traccar/protocol/EgtsFrameDecoder.java +++ b/src/org/traccar/protocol/EgtsFrameDecoder.java @@ -15,23 +15,23 @@ */ package org.traccar.protocol; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.handler.codec.frame.FrameDecoder; +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandlerContext; +import org.traccar.BaseFrameDecoder; -public class EgtsFrameDecoder extends FrameDecoder { +public class EgtsFrameDecoder extends BaseFrameDecoder { @Override protected Object decode( - ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception { + ChannelHandlerContext ctx, Channel channel, ByteBuf buf) throws Exception { if (buf.readableBytes() < 10) { return null; } int headerLength = buf.getUnsignedByte(buf.readerIndex() + 3); - int frameLength = buf.getUnsignedShort(buf.readerIndex() + 5); + int frameLength = buf.getUnsignedShortLE(buf.readerIndex() + 5); int length = headerLength + frameLength + (frameLength > 0 ? 2 : 0); |