aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Clark <stefanclark@gmail.com>2022-09-17 20:46:40 +0100
committerStefan Clark <stefanclark@gmail.com>2022-09-17 20:46:40 +0100
commit7aa230b9ddcd5540e7ff9c9b3d9bcf5119175c46 (patch)
tree1fcd95e44cd546389547a3a8dcc2e5939bc041ba
parentdbc5fc5dcf697dcc00d357bbca5fe4669325148b (diff)
downloadtrackermap-server-7aa230b9ddcd5540e7ff9c9b3d9bcf5119175c46.tar.gz
trackermap-server-7aa230b9ddcd5540e7ff9c9b3d9bcf5119175c46.tar.bz2
trackermap-server-7aa230b9ddcd5540e7ff9c9b3d9bcf5119175c46.zip
Xexun2 Encoder update
-rw-r--r--src/main/java/org/traccar/protocol/Xexun2ProtocolEncoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Xexun2ProtocolEncoder.java b/src/main/java/org/traccar/protocol/Xexun2ProtocolEncoder.java
index c315cab30..8f3fa5672 100644
--- a/src/main/java/org/traccar/protocol/Xexun2ProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/Xexun2ProtocolEncoder.java
@@ -40,7 +40,7 @@ public class Xexun2ProtocolEncoder extends BaseProtocolEncoder {
buf.writeShort(Xexun2ProtocolDecoder.MSG_COMMAND);
buf.writeShort(1); // index
buf.writeBytes(DataConverter.parseHex(uniqueId + "0"));
- buf.writeShort(message.capacity());
+ buf.writeShort(message.readableBytes());
buf.writeShort(Checksum.ip(message.nioBuffer()));
buf.writeBytes(message);
buf.writeShort(Xexun2ProtocolDecoder.FLAG);