diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-26 12:04:31 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-26 12:04:31 +1300 |
commit | 39650cf5e3fa32f767dac5ce0ee066e8e4906945 (patch) | |
tree | f77cc08023b10698f6a6a6ae1b614a203ba1779b /src/org/traccar/protocol/Mta6ProtocolDecoder.java | |
parent | 7ee16ab6fe928171ded0e188811a631743285a58 (diff) | |
download | trackermap-server-39650cf5e3fa32f767dac5ce0ee066e8e4906945.tar.gz trackermap-server-39650cf5e3fa32f767dac5ce0ee066e8e4906945.tar.bz2 trackermap-server-39650cf5e3fa32f767dac5ce0ee066e8e4906945.zip |
Use indexOf method in decoders
Diffstat (limited to 'src/org/traccar/protocol/Mta6ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Mta6ProtocolDecoder.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java index b65a16103..c5af48abc 100644 --- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java +++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java @@ -292,7 +292,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { // Read identifier buf.skipBytes("id=".length()); - int index = ChannelBufferTools.find(buf, buf.readerIndex(), length, "&"); + int index = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) '&'); String uniqueId = buf.toString(buf.readerIndex(), index - buf.readerIndex(), Charset.defaultCharset()); if (!identify(uniqueId, channel)) { return null; |