diff options
Diffstat (limited to 'src/org/traccar/protocol/GoSafeProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/GoSafeProtocolDecoder.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java index 65f058bb6..3d981bb60 100644 --- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java +++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java @@ -33,8 +33,8 @@ import org.traccar.model.Position; public class GoSafeProtocolDecoder extends BaseProtocolDecoder { - public GoSafeProtocolDecoder(DataManager dataManager, String protocol, Properties properties) { - super(dataManager, protocol, properties); + public GoSafeProtocolDecoder(String protocol) { + super(protocol); } private static final Pattern pattern = Pattern.compile( @@ -73,14 +73,11 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder { Integer index = 1; // Get device by IMEI - String imei = parser.group(index++); - try { - position.setDeviceId(getDataManager().getDeviceByImei(imei).getId()); - } catch(Exception error) { - Log.warning("Unknown device - " + imei); + if (!identify(parser.group(index++))) { return null; } - + position.setDeviceId(getDeviceId()); + // Date Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); time.clear(); |