aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorEdward Valley <ed.valley@yandex.com>2019-07-12 08:53:31 -0400
committerEdward Valley <ed.valley@yandex.com>2019-07-12 08:53:31 -0400
commit4fd816d4fcd35b1ab59857c3662d592a23372d94 (patch)
treec4320721fafd1af0278a5068a5c83d8d1b9d6142 /src/main
parent01cb6d0be635976128fade70a36a9726539bc401 (diff)
downloadtrackermap-server-4fd816d4fcd35b1ab59857c3662d592a23372d94.tar.gz
trackermap-server-4fd816d4fcd35b1ab59857c3662d592a23372d94.tar.bz2
trackermap-server-4fd816d4fcd35b1ab59857c3662d592a23372d94.zip
Changes after seventh review
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java17
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);
}