aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/SkypatrolProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocolDecoder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
index 13e036f0a..d07bb152b 100644
--- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -19,6 +19,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.Context;
+import org.traccar.DeviceSession;
import org.traccar.helper.BitUtil;
import org.traccar.helper.DateBuilder;
import org.traccar.helper.Log;
@@ -84,10 +85,11 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
Log.warning("No device id field");
return null;
}
- if (!identify(id, channel, remoteAddress)) {
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, id);
+ if (deviceSession == null) {
return null;
}
- position.setDeviceId(getDeviceId());
+ position.setDeviceId(deviceSession.getDeviceId());
if (BitUtil.check(mask, 3)) {
buf.readUnsignedShort(); // io data