diff options
Diffstat (limited to 'src/org/traccar/protocol/Gps103ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 1f19b56e4..9c9f56b2f 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -94,7 +94,12 @@ public class Gps103ProtocolDecoder extends GenericProtocolDecoder { // Get device by IMEI String imei = parser.group(index++); - position.setDeviceId(getDataManager().getDeviceByImei(imei).getId()); + try { + position.setDeviceId(getDataManager().getDeviceByImei(imei).getId()); + } catch(Exception error) { + Log.warning("Unknown device - " + imei); + return null; + } // Alarm message extendedInfo.append("<alarm>"); |