aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-20 23:37:13 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-07-20 23:37:13 +1200
commitdfbadf146bc23231ffb7d3bc03d5933e43acf77f (patch)
tree73c1cd0fa9164b095147131ab928a73d5ee8fa81 /src/org/traccar/protocol
parentd6fba0cc479f32f57b3359c7b87344918339a650 (diff)
downloadtrackermap-server-dfbadf146bc23231ffb7d3bc03d5933e43acf77f.tar.gz
trackermap-server-dfbadf146bc23231ffb7d3bc03d5933e43acf77f.tar.bz2
trackermap-server-dfbadf146bc23231ffb7d3bc03d5933e43acf77f.zip
Update L100 protocol decoder
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/L100ProtocolDecoder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/L100ProtocolDecoder.java b/src/org/traccar/protocol/L100ProtocolDecoder.java
index b7e2e91cc..ff0687751 100644
--- a/src/org/traccar/protocol/L100ProtocolDecoder.java
+++ b/src/org/traccar/protocol/L100ProtocolDecoder.java
@@ -18,6 +18,7 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
+import org.traccar.DeviceSession;
import org.traccar.helper.DateBuilder;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
@@ -82,10 +83,11 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder {
Position position = new Position();
position.setProtocol(getProtocolName());
- if (!identify(parser.next(), channel, remoteAddress)) {
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
+ if (deviceSession == null) {
return null;
}
- position.setDeviceId(getDeviceId());
+ position.setDeviceId(deviceSession.getDeviceId());
DateBuilder dateBuilder = new DateBuilder()
.setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());