From 1a0ee4171d4f3dbddcbffc65f254fae2bd4632e0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 6 Apr 2017 01:41:54 +1200 Subject: Fix Cellocator UDP acknowledgement --- src/org/traccar/protocol/CellocatorProtocolDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org') 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) { -- cgit v1.2.3