aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorChristoph Krey <krey.christoph@gmail.com>2017-06-29 13:10:16 +0200
committerChristoph Krey <krey.christoph@gmail.com>2017-06-29 13:10:16 +0200
commit42cf2358fefa5176a3c72478a778ae382c9e1836 (patch)
treeb93423c13affae784cd189e5100f84bb47d0e8d7 /src/org/traccar/protocol
parenta24f48627b914b6a8fe60bc3b5f76abc4f6fc574 (diff)
downloadtrackermap-server-42cf2358fefa5176a3c72478a778ae382c9e1836.tar.gz
trackermap-server-42cf2358fefa5176a3c72478a778ae382c9e1836.tar.bz2
trackermap-server-42cf2358fefa5176a3c72478a778ae382c9e1836.zip
[FIX] Aplicom protocol does not ignore Alive messages #3305
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/AplicomFrameDecoder.java5
1 files changed, 5 insertions, 0 deletions
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;