From 4fd816d4fcd35b1ab59857c3662d592a23372d94 Mon Sep 17 00:00:00 2001 From: Edward Valley Date: Fri, 12 Jul 2019 08:53:31 -0400 Subject: Changes after seventh review --- .../org/traccar/protocol/LaipacProtocolDecoder.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java index e03ff672c..7c73ee7be 100644 --- a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java @@ -163,16 +163,6 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder { } - private Object decodeEchk( - String sentence, Channel channel, SocketAddress remoteAddress) { - - if (channel != null) { - channel.writeAndFlush(new NetworkMessage(sentence + "\r\n", remoteAddress)); - } - - return null; - } - protected Object decodeAvrmc( String sentence, Channel channel, SocketAddress remoteAddress) { @@ -246,9 +236,10 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; if (sentence.startsWith("$ECHK")) { - return decodeEchk(sentence, channel, remoteAddress); - } - if (sentence.startsWith("$AVRMC")) { + if (channel != null) { + channel.writeAndFlush(new NetworkMessage(sentence + "\r\n", remoteAddress)); + } + } else if (sentence.startsWith("$AVRMC")) { return decodeAvrmc(sentence, channel, remoteAddress); } -- cgit v1.2.3