aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TaipProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-08 09:05:39 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-08 09:05:39 +1200
commit4c64b523b09588510a7559d1531b2918d1769928 (patch)
treedc054ba423201b2afc35ae41410761f1f4595422 /src/org/traccar/protocol/TaipProtocolDecoder.java
parent3b7148075815aa7f6cd650013949934a50a573f7 (diff)
downloadtrackermap-server-4c64b523b09588510a7559d1531b2918d1769928.tar.gz
trackermap-server-4c64b523b09588510a7559d1531b2918d1769928.tar.bz2
trackermap-server-4c64b523b09588510a7559d1531b2918d1769928.zip
Enable ACK for UDP TAIP protocol
Diffstat (limited to 'src/org/traccar/protocol/TaipProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TaipProtocolDecoder.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java
index 34e7c6351..0309147b8 100644
--- a/src/org/traccar/protocol/TaipProtocolDecoder.java
+++ b/src/org/traccar/protocol/TaipProtocolDecoder.java
@@ -32,11 +32,8 @@ import java.util.regex.Pattern;
public class TaipProtocolDecoder extends BaseProtocolDecoder {
- private final boolean sendResponse;
-
public TaipProtocolDecoder(TaipProtocol protocol, boolean sendResponse) {
super(protocol);
- this.sendResponse = sendResponse;
}
private static final Pattern PATTERN = new PatternBuilder()
@@ -197,13 +194,13 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder {
}
if (deviceSession != null) {
- if (sendResponse && channel != null) {
+ if (channel != null) {
if (messageIndex != null) {
String response = ">ACK;" + messageIndex + ";ID=" + uniqueId + ";*";
response += String.format("%02X", Checksum.xor(response)) + "<";
- channel.write(response);
+ channel.write(response, remoteAddress);
} else {
- channel.write(uniqueId);
+ channel.write(uniqueId, remoteAddress);
}
}