From 42cf2358fefa5176a3c72478a778ae382c9e1836 Mon Sep 17 00:00:00 2001 From: Christoph Krey Date: Thu, 29 Jun 2017 13:10:16 +0200 Subject: [FIX] Aplicom protocol does not ignore Alive messages #3305 --- src/org/traccar/protocol/AplicomFrameDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/AplicomFrameDecoder.java b/src/org/traccar/protocol/AplicomFrameDecoder.java index 785d90767..e12848f8f 100644 --- a/src/org/traccar/protocol/AplicomFrameDecoder.java +++ b/src/org/traccar/protocol/AplicomFrameDecoder.java @@ -26,6 +26,11 @@ public class AplicomFrameDecoder extends FrameDecoder { protected Object decode( ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception { + // Skip Alive message + while (buf.readableBytes() > 0 && Character.isDigit(buf.getByte(buf.readerIndex()))) { + buf.readByte(); + } + // Check minimum length if (buf.readableBytes() < 11) { return null; -- cgit v1.2.3