aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Mta6ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-26 12:04:31 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-26 12:04:31 +1300
commit39650cf5e3fa32f767dac5ce0ee066e8e4906945 (patch)
treef77cc08023b10698f6a6a6ae1b614a203ba1779b /src/org/traccar/protocol/Mta6ProtocolDecoder.java
parent7ee16ab6fe928171ded0e188811a631743285a58 (diff)
downloadtrackermap-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.java2
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;