aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-01-23 21:36:42 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-01-23 21:36:42 +1300
commit090522d898384755bdf96842726c092a046ab4dd (patch)
tree5cb4f61bb6c3f007a6b5dcf94d5fa2cda47dd803 /src/org/traccar
parentb089b69bb231382c470a71bcf1179fd4786ba431 (diff)
downloadtraccar-server-090522d898384755bdf96842726c092a046ab4dd.tar.gz
traccar-server-090522d898384755bdf96842726c092a046ab4dd.tar.bz2
traccar-server-090522d898384755bdf96842726c092a046ab4dd.zip
Fix short Meiligao ids
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
index 7ad91a807..635f7d67b 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
@@ -77,7 +77,10 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
id += d2;
}
- return id + Crc.luhnChecksum(id);
+ if (id.length() == 14) {
+ id += Crc.luhnChecksum(id); // IMEI checksum
+ }
+ return id;
}
@Override