aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/database/DeviceManager.java1
-rw-r--r--src/org/traccar/model/Device.java2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java
index ae5784b01..68e2e8262 100644
--- a/src/org/traccar/database/DeviceManager.java
+++ b/src/org/traccar/database/DeviceManager.java
@@ -131,7 +131,6 @@ public class DeviceManager implements IdentityManager {
device.setGeofenceIds(geofenceManager.getCurrentDeviceGeofences(lastPosition));
}
}
- device.setStatus(Device.STATUS_OFFLINE);
}
}
for (Iterator<Long> iterator = devicesById.keySet().iterator(); iterator.hasNext();) {
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 22426c4db..2324da532 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -47,7 +47,7 @@ public class Device extends Extensible {
private String status;
public String getStatus() {
- return status;
+ return status != null ? status : STATUS_OFFLINE;
}
public void setStatus(String status) {