aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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);