aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-01-06 22:45:48 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-01-06 22:45:48 -0800
commitd21747209c9092e3cd693a872d38b9fac8fb1abc (patch)
tree120dfc817e6efdf5b7a15389f8eb11135e0d5f8a /src/main/java/org/traccar/protocol/AdmProtocolDecoder.java
parenta9745c6b14a0b6f48e57b9055c0977d814b46e28 (diff)
downloadtrackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.gz
trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.bz2
trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.zip
Satellite protocol support
Diffstat (limited to 'src/main/java/org/traccar/protocol/AdmProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/AdmProtocolDecoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java b/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java
index 52d1439ed..31064286e 100644
--- a/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java
@@ -178,6 +178,10 @@ public class AdmProtocolDecoder extends BaseProtocolDecoder {
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
ByteBuf buf = (ByteBuf) msg;
+ if (Character.isDigit(buf.getUnsignedByte(buf.readerIndex()))) {
+ getDeviceSession(channel, remoteAddress, buf.readSlice(15).toString(StandardCharsets.UTF_8));
+ }
+
buf.readUnsignedShortLE(); // device id
int size = buf.readUnsignedByte();