From 81836343161dfe5eb4aef1972a1e368686685fd6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 4 Nov 2021 22:11:52 -0700 Subject: Fix Teltonika DualCam issues --- src/main/java/org/traccar/protocol/DualcamProtocol.java | 2 +- src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/DualcamProtocol.java b/src/main/java/org/traccar/protocol/DualcamProtocol.java index 9f8d6778e..04c4f2bd1 100644 --- a/src/main/java/org/traccar/protocol/DualcamProtocol.java +++ b/src/main/java/org/traccar/protocol/DualcamProtocol.java @@ -25,8 +25,8 @@ public class DualcamProtocol extends BaseProtocol { addServer(new TrackerServer(false, getName()) { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { + pipeline.addLast(new DualcamFrameDecoder()); pipeline.addLast(new DualcamProtocolDecoder(DualcamProtocol.this)); - pipeline.addLast(new DishaProtocolDecoder(DualcamProtocol.this)); } }); } diff --git a/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java b/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java index 4647e287c..390b8e705 100644 --- a/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java @@ -110,6 +110,7 @@ public class DualcamProtocolDecoder extends BaseProtocolDecoder { response.writeShort(MSG_INIT_REQUEST); channel.writeAndFlush(new NetworkMessage(response, remoteAddress)); } + return position; } else { currentPacket += 1; } -- cgit v1.2.3