aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Tlt2hProtocolDecoder.java3
-rw-r--r--test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
index 73e28e17b..f67ff88db 100644
--- a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -37,8 +37,7 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
private static final Pattern PATTERN_HEADER = new PatternBuilder()
.number("#(d+)#") // imei
- .expression("[^#]*#")
- .number("d+#")
+ .any()
.expression("([^#]+)#") // status
.number("d+") // number of records
.compile();
diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
index 2f7f41724..83caae208 100644
--- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Tlt2hProtocolDecoderTest extends ProtocolTest {
Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(null);
- verifyNull(decoder, text(
+ verifyPositions(decoder, text(
"#867962040161955#MT600#0000#0#0#137#41#0#AUTO#1\r\n" +
"#00019023402$GPRMC,084702.00,A,3228.6772,S,11545.9684,E,,159.80,251018,,,A*56\r\n"));