From d0d83fd1424b87fcba295676a0116cc61bf79767 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 17 Apr 2016 01:15:05 +1200 Subject: Only reply in TCP mode (fix #1836) --- src/org/traccar/protocol/T55ProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index c5704cd56..a71ef6b33 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -19,6 +19,7 @@ import java.net.SocketAddress; import java.util.Date; import java.util.regex.Pattern; import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.socket.DatagramChannel; import org.traccar.BaseProtocolDecoder; import org.traccar.helper.DateBuilder; import org.traccar.helper.Parser; @@ -92,7 +93,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { private Position decodeGprmc(String sentence, SocketAddress remoteAddress, Channel channel) { - if (channel != null) { + if (channel != null && !(channel instanceof DatagramChannel)) { channel.write("OK1\r\n"); } -- cgit v1.2.3