aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/T55ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/T55ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index 116343c5a..184f5e40b 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -22,6 +22,7 @@ import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.GenericProtocolDecoder;
+import org.traccar.helper.Log;
import org.traccar.model.DataManager;
import org.traccar.model.Position;
@@ -70,7 +71,11 @@ public class T55ProtocolDecoder extends GenericProtocolDecoder {
// Detect device ID
if (sentence.contains("$PGID")) {
String imei = sentence.substring(6, 6 + 15);
- deviceId = getDataManager().getDeviceByImei(imei).getId();
+ try {
+ deviceId = getDataManager().getDeviceByImei(imei).getId();
+ } catch(Exception error) {
+ Log.warning("Unknown device - " + imei);
+ }
}
// Parse message