aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
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) {