From 727e7bfad908abd899d1114c5405f9bf69b47ebc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 30 Jun 2015 09:51:23 +1200 Subject: Active devices in connection manager --- src/org/traccar/http/CommandsServlet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/http/CommandsServlet.java') diff --git a/src/org/traccar/http/CommandsServlet.java b/src/org/traccar/http/CommandsServlet.java index f68a7a74e..bf40b79e6 100644 --- a/src/org/traccar/http/CommandsServlet.java +++ b/src/org/traccar/http/CommandsServlet.java @@ -31,7 +31,7 @@ public class CommandsServlet extends BaseServlet { String uniqueId = command.getUniqueId(); - ActiveDevice activeDevice = Context.getDataManager().getActiveDevice(uniqueId); + ActiveDevice activeDevice = Context.getConnectionManager().getActiveDevice(uniqueId); if(activeDevice == null) { throw new RuntimeException("The device has not yet registered to the server"); } @@ -45,7 +45,7 @@ public class CommandsServlet extends BaseServlet { JsonObject json = Json.createReader(req.getReader()).readObject(); String uniqueId = json.getString("uniqueId"); - ActiveDevice activeDevice = Context.getDataManager().getActiveDevice(uniqueId); + ActiveDevice activeDevice = Context.getConnectionManager().getActiveDevice(uniqueId); if(activeDevice == null) { throw new RuntimeException("The device has not yet registered to the server"); } -- cgit v1.2.3