aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/EnforaProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/EnforaProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/EnforaProtocolDecoder.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/EnforaProtocolDecoder.java b/src/org/traccar/protocol/EnforaProtocolDecoder.java
index 8f5391fd6..430693189 100644
--- a/src/org/traccar/protocol/EnforaProtocolDecoder.java
+++ b/src/org/traccar/protocol/EnforaProtocolDecoder.java
@@ -35,8 +35,8 @@ import org.traccar.model.Position;
public class EnforaProtocolDecoder extends BaseProtocolDecoder {
- public EnforaProtocolDecoder(DataManager dataManager, String protocol, Properties properties) {
- super(dataManager, protocol, properties);
+ public EnforaProtocolDecoder(String protocol) {
+ super(protocol);
}
private static final Pattern pattern = Pattern.compile(
@@ -101,12 +101,10 @@ public class EnforaProtocolDecoder extends BaseProtocolDecoder {
Integer index = 1;
// Get device by IMEI
- try {
- position.setDeviceId(getDataManager().getDeviceByImei(imei).getId());
- } catch(Exception error) {
- Log.warning("Unknown device - " + imei);
+ if (!identify(imei)) {
return null;
}
+ position.setDeviceId(getDeviceId());
// Time
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));