diff options
Diffstat (limited to 'src/org/traccar/protocol/WondexProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/WondexProtocolDecoder.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java index a9068e7be..98b75b0d2 100644 --- a/src/org/traccar/protocol/WondexProtocolDecoder.java +++ b/src/org/traccar/protocol/WondexProtocolDecoder.java @@ -32,8 +32,8 @@ import org.traccar.model.Position; public class WondexProtocolDecoder extends BaseProtocolDecoder { - public WondexProtocolDecoder(DataManager dataManager, String protocol, Properties properties) { - super(dataManager, protocol, properties); + public WondexProtocolDecoder(String protocol) { + super(protocol); } private static final Pattern pattern = Pattern.compile( @@ -72,13 +72,10 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder { int index = 1; // Device identifier - String id = parser.group(index++); - try { - position.setDeviceId(getDataManager().getDeviceByImei(id).getId()); - } catch(Exception error) { - Log.warning("Unknown device - " + id); + if (!identify(parser.group(index++))) { return null; } + position.setDeviceId(getDeviceId()); // Time Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); |