aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-09-19 20:58:04 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-09-19 20:58:04 +1200
commit5bced58f76ef64bab98c4ef5323860cee1c4bbec (patch)
tree66a134c7240357fb713917d99954712209c7c541 /src
parentc4a796e698d7ecbb733a361af8d8b42c8f2b9d22 (diff)
downloadtrackermap-server-5bced58f76ef64bab98c4ef5323860cee1c4bbec.tar.gz
trackermap-server-5bced58f76ef64bab98c4ef5323860cee1c4bbec.tar.bz2
trackermap-server-5bced58f76ef64bab98c4ef5323860cee1c4bbec.zip
Fix GPS103 UDP mode (fix #863)
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 72be07bb6..124df4377 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -58,7 +59,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
@@ -66,7 +67,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
// Send response #1
if (sentence.contains("##")) {
if (channel != null) {
- channel.write("LOAD");
+ channel.write("LOAD", remoteAddress);
}
return null;
}
@@ -74,7 +75,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
// Send response #2
if (sentence.length() == 15 && Character.isDigit(sentence.charAt(0))) {
if (channel != null) {
- channel.write("ON");
+ channel.write("ON", remoteAddress);
}
return null;
}