aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-08-06 21:41:52 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-08-06 21:41:52 -0700
commit822abea747bb79ff72e3f54cc968c37a73beb73d (patch)
tree26760aea6543267ba583005b6d1740c9bef25b56 /src
parent5c470d62146b9530119e14211cac1d82c2c03c42 (diff)
downloadtraccar-server-822abea747bb79ff72e3f54cc968c37a73beb73d.tar.gz
traccar-server-822abea747bb79ff72e3f54cc968c37a73beb73d.tar.bz2
traccar-server-822abea747bb79ff72e3f54cc968c37a73beb73d.zip
Clean up decoder
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/BaseProtocolDecoder.java3
-rw-r--r--src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java7
2 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java
index 9dbe78c9d..c78c220aa 100644
--- a/src/main/java/org/traccar/BaseProtocolDecoder.java
+++ b/src/main/java/org/traccar/BaseProtocolDecoder.java
@@ -149,8 +149,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
public DeviceSession getDeviceSession(
Channel channel, SocketAddress remoteAddress, boolean ignoreCache, String... uniqueIds) {
if (channel != null && BasePipelineFactory.getHandler(channel.pipeline(), HttpRequestDecoder.class) != null
- || ignoreCache
- || config.getBoolean("decoder.ignoreSessionCache")) {
+ || ignoreCache || config.getBoolean("decoder.ignoreSessionCache")) {
long deviceId = findDeviceId(remoteAddress, uniqueIds);
if (deviceId != 0) {
if (connectionManager != null) {
diff --git a/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java b/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java
index d6a59ea8d..9f0baf6b2 100644
--- a/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2018 - 2019 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@ package org.traccar.protocol;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
@@ -37,8 +35,6 @@ import java.util.List;
public class EgtsProtocolDecoder extends BaseProtocolDecoder {
- private static final Logger LOGGER = LoggerFactory.getLogger(EgtsProtocolDecoder.class);
-
public EgtsProtocolDecoder(Protocol protocol) {
super(protocol);
}
@@ -270,7 +266,6 @@ public class EgtsProtocolDecoder extends BaseProtocolDecoder {
if (serviceType == SERVICE_TELEDATA && position.getValid()) {
if (useObjectIdAsDeviceId && objectId != 0L) {
- LOGGER.debug("[{}] Using objectId as deviceId: {}", channel == null ? "" : channel.id(), objectId);
deviceSession = getDeviceSession(channel, remoteAddress, true, String.valueOf(objectId));
if (deviceSession != null) {
position.setDeviceId(deviceSession.getDeviceId());