diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 13:05:07 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 13:05:07 -0800 |
commit | f94951e7e78956b2bbd438665ff290a472afde76 (patch) | |
tree | 21ae964507b4e4e3a3c7f657e9057375c35701d1 /src/main/java/org/traccar/BaseProtocolDecoder.java | |
parent | 152d8fe43e4e7c15308ea39a19ac6c10da871ef7 (diff) | |
download | trackermap-server-f94951e7e78956b2bbd438665ff290a472afde76.tar.gz trackermap-server-f94951e7e78956b2bbd438665ff290a472afde76.tar.bz2 trackermap-server-f94951e7e78956b2bbd438665ff290a472afde76.zip |
Migrate more boolean keys
Diffstat (limited to 'src/main/java/org/traccar/BaseProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/BaseProtocolDecoder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java index 4c35bb471..78282b4a5 100644 --- a/src/main/java/org/traccar/BaseProtocolDecoder.java +++ b/src/main/java/org/traccar/BaseProtocolDecoder.java @@ -21,6 +21,7 @@ import io.netty.handler.codec.http.HttpRequestDecoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.traccar.config.Config; +import org.traccar.config.Keys; import org.traccar.database.CommandsManager; import org.traccar.database.ConnectionManager; import org.traccar.database.IdentityManager; @@ -117,10 +118,10 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { } catch (Exception e) { LOGGER.warn("Find device error", e); } - if (deviceId == 0 && config.getBoolean("database.registerUnknown")) { + if (deviceId == 0 && config.getBoolean(Keys.DATABASE_REGISTER_UNKNOWN)) { return identityManager.addUnknownDevice(uniqueIds[0]); } - if (device != null && !device.getDisabled() || config.getBoolean("database.storeDisabled")) { + if (device != null && !device.getDisabled()) { return deviceId; } StringBuilder message = new StringBuilder(); |