From 52e7002ed39c333884529c3a0e8b4c6d23f0115e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 24 Jun 2016 09:36:20 +0500 Subject: - Reverted changes in web-client - Removed duplicate flag --- src/org/traccar/BasePipelineFactory.java | 8 +++----- src/org/traccar/Context.java | 2 +- src/org/traccar/web/WebServer.java | 11 ++--------- 3 files changed, 6 insertions(+), 15 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index 9de9b3a52..44f1b0657 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -142,11 +142,9 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { if (Context.getConfig().getBoolean("event.motionHandler")) { motionEventHandler = new MotionEventHandler(); } - - if (Context.getConfig().getBoolean("geofence.enable") - && Context.getConfig().getBoolean("event.geofenceHandler")) { - geofenceEventHandler = new GeofenceEventHandler(); - } + } + if (Context.getConfig().getBoolean("event.geofenceHandler")) { + geofenceEventHandler = new GeofenceEventHandler(); } } diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index 7d22ac681..b37e87331 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -193,7 +193,7 @@ public final class Context { connectionManager = new ConnectionManager(dataManager); - if (config.getBoolean("geofence.enable")) { + if (config.getBoolean("event.geofenceHandler")) { geofenceManager = new GeofenceManager(dataManager); } diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 2fa5c1a80..c06ee5d35 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -29,7 +29,6 @@ import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.servlet.ServletContainer; import org.traccar.Config; -import org.traccar.Context; import org.traccar.api.AsyncSocketServlet; import org.traccar.api.CorsResponseFilter; import org.traccar.api.ObjectMapperProvider; @@ -155,14 +154,8 @@ public class WebServer { resourceConfig.registerClasses(ServerResource.class, SessionResource.class, CommandResource.class, GroupPermissionResource.class, DevicePermissionResource.class, UserResource.class, GroupResource.class, DeviceResource.class, PositionResource.class, - CommandTypeResource.class); - if (Context.getConfig().getBoolean("event.enable")) { - resourceConfig.registerClasses(EventResource.class); - } - if (Context.getConfig().getBoolean("geofence.enable")) { - resourceConfig.registerClasses(GeofenceResource.class, DeviceGeofenceResource.class, - GeofencePermissionResource.class, GroupGeofenceResource.class); - } + CommandTypeResource.class, EventResource.class, GeofenceResource.class, + DeviceGeofenceResource.class, GeofencePermissionResource.class, GroupGeofenceResource.class); servletHandler.addServlet(new ServletHolder(new ServletContainer(resourceConfig)), "/*"); handlers.addHandler(servletHandler); -- cgit v1.2.3