From cece144cb40875887800251e20b9d44cb609052f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 30 Mar 2017 07:05:56 +1300 Subject: Handle empty Starlink cell info --- src/org/traccar/protocol/StarLinkProtocolDecoder.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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])); -- cgit v1.2.3