aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-30 10:02:26 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-30 10:03:09 +1300
commita017cdabef201be45e96379b58154163d68fc00f (patch)
tree608662393ad902a927acba90f9bf9571b12ada0f /src/org/traccar/protocol/TeltonikaProtocolDecoder.java
parentdd943e107a9680948747fb0ab2132cc57d027352 (diff)
downloadtrackermap-server-a017cdabef201be45e96379b58154163d68fc00f.tar.gz
trackermap-server-a017cdabef201be45e96379b58154163d68fc00f.tar.bz2
trackermap-server-a017cdabef201be45e96379b58154163d68fc00f.zip
Always pass remote address to identify method
Diffstat (limited to 'src/org/traccar/protocol/TeltonikaProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index e82425a54..f8266d076 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -35,11 +35,11 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- private void parseIdentification(Channel channel, ChannelBuffer buf) {
+ private void parseIdentification(Channel channel, SocketAddress remoteAddress, ChannelBuffer buf) {
int length = buf.readUnsignedShort();
String imei = buf.toString(buf.readerIndex(), length, Charset.defaultCharset());
- boolean result = identify(imei, channel);
+ boolean result = identify(imei, channel, remoteAddress);
if (channel != null) {
ChannelBuffer response = ChannelBuffers.directBuffer(1);
@@ -210,7 +210,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
ChannelBuffer buf = (ChannelBuffer) msg;
if (buf.getUnsignedShort(0) > 0) {
- parseIdentification(channel, buf);
+ parseIdentification(channel, remoteAddress, buf);
} else {
return parseLocation(channel, buf);
}