aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/TaipProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-05-11 21:16:25 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-05-11 21:16:25 -0700
commita72d9910a7eafbd01c7b730dc94063727a781a6b (patch)
treef828776a8b8e66958c21bddbe4e9c6ca767b24fd /src/main/java/org/traccar/protocol/TaipProtocol.java
parent056b1cfb785aa106b62f791b9476002471c2a8c3 (diff)
downloadtrackermap-server-a72d9910a7eafbd01c7b730dc94063727a781a6b.tar.gz
trackermap-server-a72d9910a7eafbd01c7b730dc94063727a781a6b.tar.bz2
trackermap-server-a72d9910a7eafbd01c7b730dc94063727a781a6b.zip
Fix command encoding
Diffstat (limited to 'src/main/java/org/traccar/protocol/TaipProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/TaipProtocol.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/TaipProtocol.java b/src/main/java/org/traccar/protocol/TaipProtocol.java
index 5df9f7d3c..0966cfd7c 100644
--- a/src/main/java/org/traccar/protocol/TaipProtocol.java
+++ b/src/main/java/org/traccar/protocol/TaipProtocol.java
@@ -16,6 +16,7 @@
package org.traccar.protocol;
import io.netty.handler.codec.string.StringDecoder;
+import io.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.PipelineBuilder;
@@ -28,16 +29,18 @@ public class TaipProtocol extends BaseProtocol {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
pipeline.addLast(new CharacterDelimiterFrameDecoder(1024, '<'));
+ pipeline.addLast(new TaipPrefixEncoder(TaipProtocol.this));
pipeline.addLast(new StringDecoder());
- pipeline.addLast(new TaipStringEncoder(TaipProtocol.this));
+ pipeline.addLast(new StringEncoder());
pipeline.addLast(new TaipProtocolDecoder(TaipProtocol.this));
}
});
addServer(new TrackerServer(true, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
+ pipeline.addLast(new TaipPrefixEncoder(TaipProtocol.this));
pipeline.addLast(new StringDecoder());
- pipeline.addLast(new TaipStringEncoder(TaipProtocol.this));
+ pipeline.addLast(new StringEncoder());
pipeline.addLast(new TaipProtocolDecoder(TaipProtocol.this));
}
});