diff options
author | Edward Valley <ed.valley@yandex.com> | 2019-07-12 08:53:31 -0400 |
---|---|---|
committer | Edward Valley <ed.valley@yandex.com> | 2019-07-12 08:53:31 -0400 |
commit | 4fd816d4fcd35b1ab59857c3662d592a23372d94 (patch) | |
tree | c4320721fafd1af0278a5068a5c83d8d1b9d6142 | |
parent | 01cb6d0be635976128fade70a36a9726539bc401 (diff) | |
download | trackermap-server-4fd816d4fcd35b1ab59857c3662d592a23372d94.tar.gz trackermap-server-4fd816d4fcd35b1ab59857c3662d592a23372d94.tar.bz2 trackermap-server-4fd816d4fcd35b1ab59857c3662d592a23372d94.zip |
Changes after seventh review
-rw-r--r-- | src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java | 17 |
1 files changed, 4 insertions, 13 deletions
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); } |