diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-06 01:41:54 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-06 01:41:54 +1200 |
commit | 1a0ee4171d4f3dbddcbffc65f254fae2bd4632e0 (patch) | |
tree | 09f31b1b174b6194f1e98c6810e1c456536f4fcc /src/org | |
parent | a48cd335e1a661fba4e5ecbbac9925dcf6c97d78 (diff) | |
download | traccar-server-1a0ee4171d4f3dbddcbffc65f254fae2bd4632e0.tar.gz traccar-server-1a0ee4171d4f3dbddcbffc65f254fae2bd4632e0.tar.bz2 traccar-server-1a0ee4171d4f3dbddcbffc65f254fae2bd4632e0.zip |
Fix Cellocator UDP acknowledgement
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/CellocatorProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java index 2b4fa9fb6..7ef013e28 100644 --- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java +++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java @@ -43,7 +43,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder { private byte commandCount; - private void sendReply(Channel channel, long deviceId, byte packetNumber) { + private void sendReply(Channel channel, SocketAddress remoteAddress, long deviceId, byte packetNumber) { ChannelBuffer reply = ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN, 28); reply.writeByte('M'); reply.writeByte('C'); @@ -64,7 +64,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder { reply.writeByte(checksum); if (channel != null) { - channel.write(reply); + channel.write(reply, remoteAddress); } } @@ -96,7 +96,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder { } byte packetNumber = buf.readByte(); - sendReply(channel, deviceUniqueId, packetNumber); + sendReply(channel, remoteAddress, deviceUniqueId, packetNumber); if (type == MSG_CLIENT_STATUS) { |