aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-05-29 20:20:12 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-05-29 20:21:31 +1200
commitf439d7b06285ce442cd721391aadede3ff6ac702 (patch)
tree1e3d7ccb2a72f38419f45a0a32a99c8ea96a1597 /src/org
parent03b3ab6adfc0083ae51f6274abc280668553bc58 (diff)
downloadtrackermap-server-f439d7b06285ce442cd721391aadede3ff6ac702.tar.gz
trackermap-server-f439d7b06285ce442cd721391aadede3ff6ac702.tar.bz2
trackermap-server-f439d7b06285ce442cd721391aadede3ff6ac702.zip
Implement Sabertek response
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/SabertekProtocolDecoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/SabertekProtocolDecoder.java b/src/org/traccar/protocol/SabertekProtocolDecoder.java
index d1f88dc5e..715aa37f2 100644
--- a/src/org/traccar/protocol/SabertekProtocolDecoder.java
+++ b/src/org/traccar/protocol/SabertekProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
@@ -69,6 +70,9 @@ public class SabertekProtocolDecoder extends BaseProtocolDecoder {
}
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
+ if (channel != null) {
+ channel.write(ChannelBuffers.wrappedBuffer(new byte[]{(byte) (deviceSession != null ? 0x06 : 0x15)}));
+ }
if (deviceSession == null) {
return null;
}