aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-12-17 22:50:23 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-12-17 22:50:23 +1300
commit377822c54373e2ccef485d54482114a661cb926c (patch)
tree9aa0ab6cc6b59a6b05c9a3a95cf87554cba8a83a
parentdad236c8944ba4fac7e7c341b59b796e43898c1d (diff)
downloadtraccar-server-377822c54373e2ccef485d54482114a661cb926c.tar.gz
traccar-server-377822c54373e2ccef485d54482114a661cb926c.tar.bz2
traccar-server-377822c54373e2ccef485d54482114a661cb926c.zip
Check for device id
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index 009baebd0..e63189dae 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -99,10 +99,11 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
}
}
- else if (type == MSG_GPS ||
+ else if (deviceId != null &&
+ (type == MSG_GPS ||
type == MSG_ALARM ||
type == MSG_STATE ||
- type == MSG_SMS) {
+ type == MSG_SMS)) {
// Create new position
Position position = new Position();