From 2f062e12746c48fe6262736b08e5e15f033447e4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 24 Apr 2020 22:21:33 -0700 Subject: Fix Wialon decoder --- src/main/java/org/traccar/protocol/WialonProtocolDecoder.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java b/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java index 8488ca2d1..223d032b8 100644 --- a/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 - 2019 Anton Tananaev (anton@traccar.org) + * Copyright 2013 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -158,7 +158,6 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder { case "L": String[] values = data.split(";"); - String imei = values[0].indexOf('.') >= 0 ? values[1] : values[0]; DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, imei); if (deviceSession != null) { @@ -172,11 +171,9 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder { case "D": case "SD": - Position position = decodePosition( - channel, remoteAddress, id, data); - + Position position = decodePosition(channel, remoteAddress, id, data); if (position != null) { - sendResponse(channel, remoteAddress, type, 1); + sendResponse(channel, remoteAddress, "D", 1); return position; } break; -- cgit v1.2.3