aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-16 10:37:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-16 10:37:04 +1300
commitbb75474486b574b5364798b97cd700fa10e4e642 (patch)
tree91c7e385f2f1b8903abfaa67b44a42399d0764eb
parent4e07ad9afa05e61e884e2c4be83b1cd4f9d051ae (diff)
downloadtrackermap-server-bb75474486b574b5364798b97cd700fa10e4e642.tar.gz
trackermap-server-bb75474486b574b5364798b97cd700fa10e4e642.tar.bz2
trackermap-server-bb75474486b574b5364798b97cd700fa10e4e642.zip
Get OsmAnd connection session only once
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index eddfb592c..6017f4a6c 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -135,8 +135,7 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder {
position.setTime(new Date());
}
- DeviceSession deviceSession = getDeviceSession(channel, remoteAddress);
- if (deviceSession != null) {
+ if (position.getDeviceId() != 0) {
sendResponse(channel, HttpResponseStatus.OK);
return position;
} else {