aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java6
1 files changed, 6 insertions, 0 deletions
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;