aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-21 00:32:38 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-08-21 09:33:59 +1200
commit901bcf5da82eb7d1370856ceb732397e8ef4c670 (patch)
tree6a8c8d8f9dd428bb2d4f0d17447415a5b2dc44db /src
parentaa6c631a0184405b5e67ed6183acbf4c4a6b9536 (diff)
downloadtrackermap-server-901bcf5da82eb7d1370856ceb732397e8ef4c670.tar.gz
trackermap-server-901bcf5da82eb7d1370856ceb732397e8ef4c670.tar.bz2
trackermap-server-901bcf5da82eb7d1370856ceb732397e8ef4c670.zip
Do not save IP by default
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/BasePipelineFactory.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index da8060071..ac1d450c5 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -51,6 +51,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
private FilterHandler filterHandler;
private DistanceHandler distanceHandler;
+ private RemoteAddressHandler remoteAddressHandler;
private MotionHandler motionHandler;
private GeocoderHandler geocoderHandler;
private GeolocationHandler geolocationHandler;
@@ -132,6 +133,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
Context.getConfig().getInteger("coordinates.minError"),
Context.getConfig().getInteger("coordinates.maxError"));
+ if (Context.getConfig().getBoolean("processing.remoteAddress.enable")) {
+ remoteAddressHandler = new RemoteAddressHandler();
+ }
+
if (Context.getConfig().getBoolean("filter.enable")) {
filterHandler = new FilterHandler();
}
@@ -202,7 +207,9 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("distance", distanceHandler);
}
- pipeline.addLast("remoteAddress", new RemoteAddressHandler());
+ if (remoteAddressHandler != null) {
+ pipeline.addLast("remoteAddress", remoteAddressHandler);
+ }
addDynamicHandlers(pipeline);