aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CastelProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/CastelProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index 1be66b17d..344ca2df4 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -205,6 +205,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
response.writeShort(type);
if (content != null) {
response.writeBytes(content);
+ content.release();
}
response.writeShortLE(
Checksum.crc16(Checksum.CRC16_X25, response.nioBuffer(0, response.writerIndex())));
@@ -296,7 +297,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
|| type == MSG_SC_ALARM || type == MSG_SC_CURRENT_LOCATION || type == MSG_SC_FUEL) {
if (type == MSG_SC_LOGIN) {
- ByteBuf response = Unpooled.buffer(10); // TODO ref count
+ ByteBuf response = Unpooled.buffer(10);
response.writeIntLE(0xFFFFFFFF);
response.writeShortLE(0);
response.writeIntLE((int) (System.currentTimeMillis() / 1000));