aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-01 15:31:05 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-01 15:31:31 +1300
commita79386202fcf1feb86b7770cbbbcfe65fa4a95ca (patch)
tree8f68a84c8d3915d150974b587e843a271ac6bd1c /src
parent4a4d58092cc26635f59a0b9b2067c2ce43c68d0e (diff)
downloadtraccar-server-a79386202fcf1feb86b7770cbbbcfe65fa4a95ca.tar.gz
traccar-server-a79386202fcf1feb86b7770cbbbcfe65fa4a95ca.tar.bz2
traccar-server-a79386202fcf1feb86b7770cbbbcfe65fa4a95ca.zip
Handle H02 message new line
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 5ee663ee1..9764adf04 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -456,7 +456,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
switch (marker) {
case "*":
- String sentence = buf.toString(StandardCharsets.US_ASCII);
+ String sentence = buf.toString(StandardCharsets.US_ASCII).trim();
int typeStart = sentence.indexOf(',', sentence.indexOf(',') + 1) + 1;
int typeEnd = sentence.indexOf(',', typeStart);
if (typeEnd > 0) {