aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-12 09:55:26 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-12 09:55:26 +1200
commit0d0e118d44e8b43f351a75068c5e9077972b20c0 (patch)
treea3d2129bb266bf245f90554c1eb25ba7d6f03480
parentd8b7e10e5a003a298d287b6f03e4b1501158f916 (diff)
downloadtrackermap-server-0d0e118d44e8b43f351a75068c5e9077972b20c0.tar.gz
trackermap-server-0d0e118d44e8b43f351a75068c5e9077972b20c0.tar.bz2
trackermap-server-0d0e118d44e8b43f351a75068c5e9077972b20c0.zip
Clear device id if unidentified
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index bcd441268..d150c9c80 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -57,12 +57,14 @@ public abstract class BaseProtocolDecoder extends OneToOneDecoder {
deviceId = device.getId();
return true;
} else {
+ deviceId = 0;
if (logWarning) {
Log.warning("Unknown device - " + uniqueId);
}
return false;
}
} catch (Exception error) {
+ deviceId = 0;
Log.warning(error);
return false;
}