diff options
Diffstat (limited to 'src/org/traccar/protocol/EnforaProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/EnforaProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/EnforaProtocolDecoder.java b/src/org/traccar/protocol/EnforaProtocolDecoder.java index fc40dcbba..aa6dbaf13 100644 --- a/src/org/traccar/protocol/EnforaProtocolDecoder.java +++ b/src/org/traccar/protocol/EnforaProtocolDecoder.java @@ -107,7 +107,12 @@ public class EnforaProtocolDecoder extends GenericProtocolDecoder { Integer index = 1; // Get device by IMEI - position.setDeviceId(getDataManager().getDeviceByImei(imei).getId()); + try { + position.setDeviceId(getDataManager().getDeviceByImei(imei).getId()); + } catch(Exception error) { + Log.warning("Unknown device - " + imei); + return null; + } // Time Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); |