diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-09 00:11:14 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-09 00:11:14 +1200 |
commit | 46274ffddf31d0f09a7c370b2e374f53f6ecc2b6 (patch) | |
tree | 8d0869a71665898524fc67bfb5940a21a73c07e5 /src/org/traccar/protocol/TotemProtocolDecoder.java | |
parent | fb543fb413652f4cb0408a6caafbdd7f4a4ca369 (diff) | |
parent | c176b7b4bf4eef6f71767f92ada2591ef27c1cfa (diff) | |
download | trackermap-server-46274ffddf31d0f09a7c370b2e374f53f6ecc2b6.tar.gz trackermap-server-46274ffddf31d0f09a7c370b2e374f53f6ecc2b6.tar.bz2 trackermap-server-46274ffddf31d0f09a7c370b2e374f53f6ecc2b6.zip |
Merge pull request #3921 from Abyss777/netty4_tz-tl
Migrate part of T protocols
Diffstat (limited to 'src/org/traccar/protocol/TotemProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index c200129d2..c1ee8bf20 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -15,9 +15,10 @@ */ package org.traccar.protocol; -import org.jboss.netty.channel.Channel; +import io.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.NetworkMessage; import org.traccar.helper.BitUtil; import org.traccar.helper.Checksum; import org.traccar.helper.DateBuilder; @@ -411,9 +412,9 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { if (pattern == PATTERN4) { String response = "$$0014AA" + sentence.substring(sentence.length() - 6, sentence.length() - 2); response += String.format("%02X", Checksum.xor(response)).toUpperCase(); - channel.write(response); + channel.writeAndFlush(new NetworkMessage(response, remoteAddress)); } else { - channel.write("ACK OK\r\n"); + channel.writeAndFlush(new NetworkMessage("ACK OK\r\n", remoteAddress)); } } |