aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-23 18:23:03 +1300
committerGitHub <noreply@github.com>2017-03-23 18:23:03 +1300
commit6374653f51992462b92ca8bf861375ab6324047c (patch)
tree6ee6bdbd14dd3a8f624c1fb2ae911fbd2e2c4dd3 /src
parent0172b2b76fe70388039a38ce4770cb7caab76f16 (diff)
parentff9f34d6e685119c5d85d705d6cbd4f29149eee0 (diff)
downloadtrackermap-server-6374653f51992462b92ca8bf861375ab6324047c.tar.gz
trackermap-server-6374653f51992462b92ca8bf861375ab6324047c.tar.bz2
trackermap-server-6374653f51992462b92ca8bf861375ab6324047c.zip
Merge pull request #3034 from Abyss777/set_offline
Set status to offline for new device
Diffstat (limited to 'src')
-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) {