aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/EelinkProtocolEncoder.java2
-rw-r--r--test/org/traccar/protocol/EelinkProtocolEncoderTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocolEncoder.java b/src/org/traccar/protocol/EelinkProtocolEncoder.java
index 41d76b24a..76865a039 100644
--- a/src/org/traccar/protocol/EelinkProtocolEncoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolEncoder.java
@@ -65,7 +65,7 @@ public class EelinkProtocolEncoder extends BaseProtocolEncoder {
if (connectionless) {
result.writeByte('E');
result.writeByte('L');
- result.writeShort(2 + 2 + 2 + buf.readableBytes()); // length
+ result.writeShort(2 + buf.readableBytes()); // length
result.writeShort(checksum(buf.toByteBuffer()));
}
diff --git a/test/org/traccar/protocol/EelinkProtocolEncoderTest.java b/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
index 96be348d1..e4502f919 100644
--- a/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
@@ -15,7 +15,7 @@ public class EelinkProtocolEncoderTest extends ProtocolTest {
verifyCommand(new EelinkProtocolEncoder(false), command, binary("676780000f0000010000000052454c41592c3123"));
- verifyCommand(new EelinkProtocolEncoder(true), command, binary("454c0022b41a0123456789012345676780000f0000010000000052454c41592c3123"));
+ verifyCommand(new EelinkProtocolEncoder(true), command, binary("454c001eb41a0123456789012345676780000f0000010000000052454c41592c3123"));
}