aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/ServerManager.java8
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index c6204441d..2f49e0923 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -274,6 +274,14 @@ public class ServerManager {
pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(ServerManager.this));
}
});
+ serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(ServerManager.this));
+ }
+ });
}
}
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index c699a247c..d3220368a 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -47,7 +47,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
"(\\d{2})(\\d{2})(\\d{2}),?" + // Time (HHMMSS)
"(\\d+\\.?\\d+),?" + // Course
"([0-9a-fA-F]{8})?,?" + // State
- "(?:L([0-9a-fA-F]+))?"); // Milage
+ "(?:L([0-9a-fA-F]+))?\\)?"); // Milage
@Override
protected Object decode(