diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-08-31 10:39:37 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-08-31 10:39:37 -0700 |
commit | e698c554f5c33da7f7f32e544c5548f6047f5884 (patch) | |
tree | 26ac5ff11bf511c02f9ca6be1a661a5ec41e28ae /src/main | |
parent | 50e7e2b17ba580afddaf11a0ea079b4535cf2478 (diff) | |
download | trackermap-server-e698c554f5c33da7f7f32e544c5548f6047f5884.tar.gz trackermap-server-e698c554f5c33da7f7f32e544c5548f6047f5884.tar.bz2 trackermap-server-e698c554f5c33da7f7f32e544c5548f6047f5884.zip |
Update response
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 6e2e1377b..09ee12256 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -58,7 +58,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { buf.writeShort(type); buf.writeShort(data.readableBytes()); buf.writeBytes(id); - buf.writeShort(1); // index + buf.writeShort(0); // index buf.writeBytes(data); data.release(); buf.writeByte(Checksum.xor(buf.nioBuffer(1, buf.readableBytes() - 1))); @@ -131,7 +131,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { ByteBuf response = Unpooled.buffer(); response.writeShort(index); response.writeByte(RESULT_SUCCESS); - response.writeBytes("authentication".getBytes(StandardCharsets.US_ASCII)); + response.writeBytes(ByteBufUtil.hexDump(id).getBytes(StandardCharsets.US_ASCII)); channel.writeAndFlush(new NetworkMessage( formatMessage(MSG_TERMINAL_REGISTER_RESPONSE, id, response), remoteAddress)); } |