From 681b8f42633d7c6741e6fbac4308ba25c4aff9fa Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 6 Jun 2018 21:56:37 +1200 Subject: Migrate D, E, F protocols --- src/org/traccar/protocol/EgtsFrameDecoder.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/org/traccar/protocol/EgtsFrameDecoder.java') 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); -- cgit v1.2.3