aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 2914fc3ac..8f495900a 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -39,6 +39,8 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
private static final Logger LOGGER = LoggerFactory.getLogger(BaseProtocolDecoder.class);
+ private static final String PROTOCOL_UNKNOWN = "unknown";
+
private final Config config = Context.getConfig();
private final IdentityManager identityManager = Context.getIdentityManager();
private final ConnectionManager connectionManager = Context.getConnectionManager();
@@ -50,7 +52,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
}
public String getProtocolName() {
- return protocol != null ? protocol.getName() : null;
+ return protocol != null ? protocol.getName() : PROTOCOL_UNKNOWN;
}
public String getServer(Channel channel) {