aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/AppelloProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/AppelloProtocolDecoder.java')
-rwxr-xr-xsrc/org/traccar/protocol/AppelloProtocolDecoder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/AppelloProtocolDecoder.java b/src/org/traccar/protocol/AppelloProtocolDecoder.java
index bc3e7885d..4535464ed 100755
--- a/src/org/traccar/protocol/AppelloProtocolDecoder.java
+++ b/src/org/traccar/protocol/AppelloProtocolDecoder.java
@@ -17,6 +17,7 @@ package org.traccar.protocol;
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;
@@ -60,13 +61,14 @@ public class AppelloProtocolDecoder extends BaseProtocolDecoder {
}
String imei = parser.next();
- if (!identify(imei, channel, remoteAddress)) {
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, imei);
+ if (deviceSession == null) {
return null;
}
Position position = new Position();
position.setProtocol(getProtocolName());
- position.setDeviceId(getDeviceId());
+ position.setDeviceId(deviceSession.getDeviceId());
if (parser.hasNext(6)) {
DateBuilder dateBuilder = new DateBuilder()