aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-28 08:53:30 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-28 08:53:30 +1300
commitdd943e107a9680948747fb0ab2132cc57d027352 (patch)
tree11f9deb194ce183670207ec20111fa689d45921f
parentcde6259e36d2ec312b5d67a5e2a75bfff41a24c3 (diff)
downloadtrackermap-server-dd943e107a9680948747fb0ab2132cc57d027352.tar.gz
trackermap-server-dd943e107a9680948747fb0ab2132cc57d027352.tar.bz2
trackermap-server-dd943e107a9680948747fb0ab2132cc57d027352.zip
Fix GPS103 LBS regex pattern (fix #1558)
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/Gps103ProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index a91848f5b..2b8eb2c67 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -67,7 +67,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
.text("imei:")
.number("(d+),") // imei
.expression("[^,]+,") // alarm
- .number("d+,,")
+ .number("d*,,")
.text("L,,,")
.number("(x+),,") // lac
.number("(x+),,,") // cid
diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
index 371b137fd..8ee080560 100644
--- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class Gps103ProtocolDecoderTest extends ProtocolDecoderTest {
Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new Gps103Protocol());
verifyAttributes(decoder, text(
+ "imei:359710049075097,help me,,,L,,,113b,,558f,,,,,0,0,,,"));
+
+ verifyAttributes(decoder, text(
"imei:359710041100000,tracker,000000000,,L,,,fa8,,c9af,,,,,0,0,0.00%,,"));
verifyAttributes(decoder, text(