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.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index bd91f5e09..3bd39d594 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar;
+import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.Date;
@@ -51,7 +52,11 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
} else {
deviceId = 0;
if (logWarning) {
- Log.warning("Unknown device - " + uniqueId);
+ String message = "Unknown device - " + uniqueId;
+ if (remoteAddress != null) {
+ message += " (" + ((InetSocketAddress) remoteAddress).getHostString() + ")";
+ }
+ Log.warning(message);
}
return false;
}
@@ -66,10 +71,6 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
return identify(uniqueId, channel, remoteAddress, true);
}
- public boolean identify(String uniqueId, Channel channel) {
- return identify(uniqueId, channel, null, true);
- }
-
public BaseProtocolDecoder(Protocol protocol) {
this.protocol = protocol;
}