aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-04-24 22:21:33 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-04-24 22:21:33 -0700
commit2f062e12746c48fe6262736b08e5e15f033447e4 (patch)
treebaa032bc9e8b33a25c850d41bd13335a125ea3e9 /src/main/java/org
parent57f7183c9a7e29f6a1de1754ece9ede7a1e5da58 (diff)
downloadtrackermap-server-2f062e12746c48fe6262736b08e5e15f033447e4.tar.gz
trackermap-server-2f062e12746c48fe6262736b08e5e15f033447e4.tar.bz2
trackermap-server-2f062e12746c48fe6262736b08e5e15f033447e4.zip
Fix Wialon decoder
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/WialonProtocolDecoder.java9
1 files changed, 3 insertions, 6 deletions
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;