aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/Device.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model/Device.java')
-rw-r--r--src/org/traccar/model/Device.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 22426c4db..4c02481ca 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -51,7 +51,11 @@ public class Device extends Extensible {
}
public void setStatus(String status) {
- this.status = status;
+ if (STATUS_ONLINE.equals(status) || STATUS_UNKNOWN.equals(status)) {
+ this.status = status;
+ } else {
+ this.status = STATUS_OFFLINE;
+ }
}
private Date lastUpdate;