aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CityeasyProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/CityeasyProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CityeasyProtocolDecoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/CityeasyProtocolDecoder.java b/src/org/traccar/protocol/CityeasyProtocolDecoder.java
index 158d84ea3..d4235c191 100644
--- a/src/org/traccar/protocol/CityeasyProtocolDecoder.java
+++ b/src/org/traccar/protocol/CityeasyProtocolDecoder.java
@@ -71,10 +71,8 @@ public class CityeasyProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShort(); // length
String imei = ChannelBufferTools.readHexString(buf, 14);
- if (!identify(imei, channel, null, false)) {
- if (!identify(imei + Checksum.luhn(Long.parseLong(imei)), channel)) {
- return null;
- }
+ if (!identify(imei, channel, null, false) && !identify(imei + Checksum.luhn(Long.parseLong(imei)), channel)) {
+ return null;
}
int type = buf.readUnsignedShort();