aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-03-09 09:14:55 -0800
committerAnton Tananaev <anton@traccar.org>2022-03-09 09:14:55 -0800
commit0e85fafea121b912e20e022e423b6b472a2e93be (patch)
treee96d90e3a4bcbf97b83e26a35279a1d33ee38c73 /src/main/java/org/traccar/protocol
parent9d0682014dd293139a56b3d08e76469a726efebd (diff)
downloadtrackermap-server-0e85fafea121b912e20e022e423b6b472a2e93be.tar.gz
trackermap-server-0e85fafea121b912e20e022e423b6b472a2e93be.tar.bz2
trackermap-server-0e85fafea121b912e20e022e423b6b472a2e93be.zip
Fix FlexApi frame decoding
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/FlexApiProtocol.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FlexApiProtocol.java b/src/main/java/org/traccar/protocol/FlexApiProtocol.java
index bc6a49907..7f4154f71 100644
--- a/src/main/java/org/traccar/protocol/FlexApiProtocol.java
+++ b/src/main/java/org/traccar/protocol/FlexApiProtocol.java
@@ -21,6 +21,8 @@ import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
+import java.nio.charset.StandardCharsets;
+
public class FlexApiProtocol extends BaseProtocol {
public FlexApiProtocol() {
@@ -28,7 +30,7 @@ public class FlexApiProtocol extends BaseProtocol {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
pipeline.addLast(new LineBasedFrameDecoder(5120));
- pipeline.addLast(new StringDecoder());
+ pipeline.addLast(new StringDecoder(StandardCharsets.US_ASCII));
pipeline.addLast(new FlexApiProtocolDecoder(FlexApiProtocol.this));
}
});