From b2a42d3bf6bda2147576c75f1bdca7a93c1ddfe6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 30 May 2020 22:09:37 -0700 Subject: Fix WLI protocol issues --- src/main/java/org/traccar/protocol/WliProtocol.java | 2 +- src/main/java/org/traccar/protocol/WliProtocolDecoder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/WliProtocol.java b/src/main/java/org/traccar/protocol/WliProtocol.java index 6573572d3..c10ebf505 100644 --- a/src/main/java/org/traccar/protocol/WliProtocol.java +++ b/src/main/java/org/traccar/protocol/WliProtocol.java @@ -26,7 +26,7 @@ public class WliProtocol extends BaseProtocol { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { pipeline.addLast(new WliFrameDecoder()); - pipeline.addLast(new Gt02ProtocolDecoder(WliProtocol.this)); + pipeline.addLast(new WliProtocolDecoder(WliProtocol.this)); } }); } diff --git a/src/main/java/org/traccar/protocol/WliProtocolDecoder.java b/src/main/java/org/traccar/protocol/WliProtocolDecoder.java index fb3d076c1..0e2a0a65e 100644 --- a/src/main/java/org/traccar/protocol/WliProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/WliProtocolDecoder.java @@ -123,7 +123,7 @@ public class WliProtocolDecoder extends BaseProtocolDecoder { } else if (type == '2') { String id = buf.toString(buf.readerIndex(), buf.readableBytes() - 1, StandardCharsets.US_ASCII); - getDeviceSession(channel, remoteAddress, id); + getDeviceSession(channel, remoteAddress, id.substring("wli:".length())); return null; } -- cgit v1.2.3