aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-16 21:02:14 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-16 21:02:14 -0700
commit5180e877de462a5950878d69d3ba33dc9ebf790b (patch)
treed89c561f26bbe44d25bf489930f42fd1e944c77c
parentf7ca64ef3e5828a6ff6302721499da62381539ec (diff)
downloadtrackermap-server-5180e877de462a5950878d69d3ba33dc9ebf790b.tar.gz
trackermap-server-5180e877de462a5950878d69d3ba33dc9ebf790b.tar.bz2
trackermap-server-5180e877de462a5950878d69d3ba33dc9ebf790b.zip
Replicate exact server response
-rw-r--r--src/main/java/org/traccar/protocol/SanulProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java1
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/SanulProtocolDecoder.java b/src/main/java/org/traccar/protocol/SanulProtocolDecoder.java
index bd29828b3..036d1ee51 100644
--- a/src/main/java/org/traccar/protocol/SanulProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SanulProtocolDecoder.java
@@ -41,7 +41,7 @@ public class SanulProtocolDecoder extends BaseProtocolDecoder {
if (channel != null) {
ByteBuf response = Unpooled.buffer();
response.writeByte(0xaa); // header
- response.writeShortLE(0); // reserved
+ response.writeShortLE(0x85da); // reserved
response.writeShortLE(15); // length
response.writeByte(1); // edition
response.writeShortLE(MSG_RESPONSE);
@@ -49,7 +49,7 @@ public class SanulProtocolDecoder extends BaseProtocolDecoder {
response.writeIntLE(0); // command id
response.writeByte(0); // status
response.writeByte(0); // result length
- response.writeIntLE(0); // result data ?
+ response.writeIntLE(0x20000); // result data ?
channel.writeAndFlush(new NetworkMessage(response, channel.remoteAddress()));
}
}
diff --git a/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java
index be0ccc460..882a63fe6 100644
--- a/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java
@@ -12,7 +12,6 @@ public class SanulProtocolDecoderTest extends ProtocolTest {
verifyNull(decoder, binary(
"aa007020000100000000000033353333353830313831353431313700000000000000000000"));
- // aa00000f00010500000000000000000000000000
}