From 1a0eae22fc58d7241e2c60bb593535a17d6c629b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 19 Jul 2016 18:45:34 +1200 Subject: Correctly add device to active --- src/org/traccar/BaseProtocolDecoder.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/org') diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java index f98617caf..46832a4ca 100644 --- a/src/org/traccar/BaseProtocolDecoder.java +++ b/src/org/traccar/BaseProtocolDecoder.java @@ -77,6 +77,9 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { } else if (deviceId != 0) { deviceSession = new DeviceSession(deviceId); addressDeviceSessions.put(remoteAddress, deviceSession); + if (Context.getConnectionManager() != null) { + Context.getConnectionManager().addActiveDevice(deviceId, protocol, channel, remoteAddress); + } return deviceSession; } else { return null; @@ -86,6 +89,9 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { long deviceId = findDeviceId(remoteAddress, uniqueIds); if (deviceId != 0) { channelDeviceSession = new DeviceSession(deviceId); + if (Context.getConnectionManager() != null) { + Context.getConnectionManager().addActiveDevice(deviceId, protocol, channel, remoteAddress); + } } } return channelDeviceSession; -- cgit v1.2.3