aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/session')
-rw-r--r--src/main/java/org/traccar/session/ConnectionManager.java5
-rw-r--r--src/main/java/org/traccar/session/cache/CacheManager.java4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/session/ConnectionManager.java b/src/main/java/org/traccar/session/ConnectionManager.java
index 6d5fefa75..3fa467b57 100644
--- a/src/main/java/org/traccar/session/ConnectionManager.java
+++ b/src/main/java/org/traccar/session/ConnectionManager.java
@@ -28,6 +28,7 @@ import org.traccar.config.Keys;
import org.traccar.database.NotificationManager;
import org.traccar.handler.events.MotionEventHandler;
import org.traccar.handler.events.OverspeedEventHandler;
+import org.traccar.helper.model.AttributeUtil;
import org.traccar.model.Device;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -279,9 +280,9 @@ public class ConnectionManager {
result.putAll(event);
}
+ double speedLimit = AttributeUtil.lookup(cacheManager, Keys.EVENT_OVERSPEED_LIMIT, deviceId);
event = Main.getInjector().getInstance(OverspeedEventHandler.class)
- .updateOverspeedState(deviceState, Context.getDeviceManager().
- lookupAttributeDouble(deviceId, OverspeedEventHandler.ATTRIBUTE_SPEED_LIMIT, 0, true, false));
+ .updateOverspeedState(deviceState, speedLimit);
if (event != null) {
result.putAll(event);
}
diff --git a/src/main/java/org/traccar/session/cache/CacheManager.java b/src/main/java/org/traccar/session/cache/CacheManager.java
index 896df83e7..87384f746 100644
--- a/src/main/java/org/traccar/session/cache/CacheManager.java
+++ b/src/main/java/org/traccar/session/cache/CacheManager.java
@@ -74,6 +74,10 @@ public class CacheManager {
invalidateUsers();
}
+ public Config getConfig() {
+ return config;
+ }
+
public <T extends BaseModel> T getObject(Class<T> clazz, long id) {
try {
lock.readLock().lock();