aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TlvProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-09 15:51:11 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-09 15:51:11 +1200
commit5cf987a9e9cab3e9ec3d2a8acc335a85f2637df0 (patch)
treee290b09c50900b4700ac244827c337ff0fc3450c /src/org/traccar/protocol/TlvProtocolDecoder.java
parentc40928cd674144fa5ed3dc7306c33b16823b2fad (diff)
downloadtrackermap-server-5cf987a9e9cab3e9ec3d2a8acc335a85f2637df0.tar.gz
trackermap-server-5cf987a9e9cab3e9ec3d2a8acc335a85f2637df0.tar.bz2
trackermap-server-5cf987a9e9cab3e9ec3d2a8acc335a85f2637df0.zip
Fix various issues
Diffstat (limited to 'src/org/traccar/protocol/TlvProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TlvProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TlvProtocolDecoder.java b/src/org/traccar/protocol/TlvProtocolDecoder.java
index b682345db..d3ce4e072 100644
--- a/src/org/traccar/protocol/TlvProtocolDecoder.java
+++ b/src/org/traccar/protocol/TlvProtocolDecoder.java
@@ -37,10 +37,10 @@ public class TlvProtocolDecoder extends BaseProtocolDecoder {
private void sendResponse(Channel channel, SocketAddress remoteAddress, String type, String... arguments) {
if (channel != null) {
ByteBuf response = Unpooled.buffer();
- response.writeBytes(Unpooled.copiedBuffer(type, StandardCharsets.US_ASCII));
+ response.writeCharSequence(type, StandardCharsets.US_ASCII);
for (String argument : arguments) {
response.writeByte(argument.length());
- response.writeBytes(Unpooled.copiedBuffer(argument, StandardCharsets.US_ASCII));
+ response.writeCharSequence(argument, StandardCharsets.US_ASCII);
}
response.writeByte(0);
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));