From a017cdabef201be45e96379b58154163d68fc00f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 30 Nov 2015 10:02:26 +1300 Subject: Always pass remote address to identify method --- src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/protocol/TeltonikaProtocolDecoder.java') 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); } -- cgit v1.2.3