aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 16:13:52 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 16:13:52 -0700
commit83494fe445a9c7cb4f6b7de1e97e0d257f8bc7c2 (patch)
tree54dfa2aba776ae6d6a2a19b4882f3ad6bd6729c7 /src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java
parent606afeb37451f921fe3aecffab439cc2bcc7a175 (diff)
downloadtraccar-server-83494fe445a9c7cb4f6b7de1e97e0d257f8bc7c2.tar.gz
traccar-server-83494fe445a9c7cb4f6b7de1e97e0d257f8bc7c2.tar.bz2
traccar-server-83494fe445a9c7cb4f6b7de1e97e0d257f8bc7c2.zip
Support HTTP response content
Diffstat (limited to 'src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java b/src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java
index 5b352a961..8b47701fd 100644
--- a/src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/LeafSpyProtocolDecoder.java
@@ -122,13 +122,8 @@ public class LeafSpyProtocolDecoder extends BaseHttpProtocolDecoder {
}
if (position.getDeviceId() != 0) {
- if (channel != null) {
- HttpResponse response = new DefaultFullHttpResponse(
- HttpVersion.HTTP_1_1,
- HttpResponseStatus.OK,
+ sendResponse(channel, HttpResponseStatus.OK,
Unpooled.copiedBuffer("\"status\":\"0\"", StandardCharsets.US_ASCII));
- channel.writeAndFlush(new NetworkMessage(response, channel.remoteAddress()));
- }
return position;
} else {
sendResponse(channel, HttpResponseStatus.BAD_REQUEST);