aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-12-27 18:13:56 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2018-12-27 18:13:56 -0800
commit2b9264c4afdf62ef4d80e7cf5993ddb03374a8be (patch)
tree216befedf59214315f39d262d4de9fe6c9b1a3e7 /src/org/traccar/BaseProtocolDecoder.java
parentd86f7a4befb7fd4b5ee1a558ccf1a5b553b02ab6 (diff)
downloadtrackermap-server-2b9264c4afdf62ef4d80e7cf5993ddb03374a8be.tar.gz
trackermap-server-2b9264c4afdf62ef4d80e7cf5993ddb03374a8be.tar.bz2
trackermap-server-2b9264c4afdf62ef4d80e7cf5993ddb03374a8be.zip
Fix Wristband protocol response
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 7d840960b..cbef4568d 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -55,13 +55,13 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
return protocol != null ? protocol.getName() : PROTOCOL_UNKNOWN;
}
- public String getServer(Channel channel) {
+ public String getServer(Channel channel, char delimiter) {
String server = config.getString(getProtocolName() + ".server");
if (server == null && channel != null) {
InetSocketAddress address = (InetSocketAddress) channel.localAddress();
server = address.getAddress().getHostAddress() + ":" + address.getPort();
}
- return server;
+ return server != null ? server.replace(':', delimiter) : null;
}
protected double convertSpeed(double value, String defaultUnits) {