diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-12 00:51:05 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-12 00:51:05 +1200 |
commit | 427aa11193724669fbe098fd64d327f6988a9612 (patch) | |
tree | af05999dfe897c083c675e4c26d19583dcf9fedb /src | |
parent | aba44d6cb91ac0b54de743dbd469ee8ca118796f (diff) | |
download | trackermap-server-427aa11193724669fbe098fd64d327f6988a9612.tar.gz trackermap-server-427aa11193724669fbe098fd64d327f6988a9612.tar.bz2 trackermap-server-427aa11193724669fbe098fd64d327f6988a9612.zip |
Fix GL200 cell decoding issue
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/Gl200ProtocolDecoder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index e7ba6faeb..fc0bbd5ff 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -303,7 +303,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { .number("(d{1,7}.d)?,") // odometer .groupEnd() .number("(dddd)(dd)(dd)") // date (yyyymmdd) - .number("(dd)(dd)(dd)").optional(2) // time (hhmmss) + .number("(dd)(dd)(dd)") // time (hhmmss) .text(",") .number("(xxxx)") // count number .text("$").optional() @@ -457,7 +457,8 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { int mnc = parser.nextInt(); if (parser.hasNext(2)) { position.setNetwork(new Network(CellTower.from(mcc, mnc, parser.nextInt(), parser.nextInt()))); - } else { + } + if (parser.hasNext(2)) { position.setNetwork(new Network(CellTower.from(mcc, mnc, parser.nextInt(16), parser.nextInt(16)))); } } |