diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-30 07:05:56 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-30 07:05:56 +1300 |
commit | cece144cb40875887800251e20b9d44cb609052f (patch) | |
tree | 93a0c6ed10663ba093d972d488ae5f0c58676057 /src/org/traccar/protocol/StarLinkProtocolDecoder.java | |
parent | 6461a7fad516e46250daca301305f36ba8bab8e6 (diff) | |
download | trackermap-server-cece144cb40875887800251e20b9d44cb609052f.tar.gz trackermap-server-cece144cb40875887800251e20b9d44cb609052f.tar.bz2 trackermap-server-cece144cb40875887800251e20b9d44cb609052f.zip |
Handle empty Starlink cell info
Diffstat (limited to 'src/org/traccar/protocol/StarLinkProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/StarLinkProtocolDecoder.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/org/traccar/protocol/StarLinkProtocolDecoder.java index 8d35ea5ba..97091257f 100644 --- a/src/org/traccar/protocol/StarLinkProtocolDecoder.java +++ b/src/org/traccar/protocol/StarLinkProtocolDecoder.java @@ -151,10 +151,14 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder { position.set(Position.PREFIX_OUT + 4, Integer.parseInt(data[i])); break; case "#LAC#": - lac = Integer.parseInt(data[i]); + if (!data[i].isEmpty()) { + lac = Integer.parseInt(data[i]); + } break; case "#CID#": - cid = Integer.parseInt(data[i]); + if (!data[i].isEmpty()) { + cid = Integer.parseInt(data[i]); + } break; case "#VIN#": position.set(Position.KEY_POWER, Double.parseDouble(data[i])); |