aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TlvProtocolDecoder.java
diff options
context:
space:
mode:
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));