diff options
Diffstat (limited to 'src/org/traccar/protocol/SabertekProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/SabertekProtocolDecoder.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/SabertekProtocolDecoder.java b/src/org/traccar/protocol/SabertekProtocolDecoder.java index 715aa37f2..8b7f2fb44 100644 --- a/src/org/traccar/protocol/SabertekProtocolDecoder.java +++ b/src/org/traccar/protocol/SabertekProtocolDecoder.java @@ -15,10 +15,11 @@ */ package org.traccar.protocol; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.channel.Channel; +import io.netty.buffer.Unpooled; +import io.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.NetworkMessage; import org.traccar.helper.BitUtil; import org.traccar.helper.Parser; import org.traccar.helper.PatternBuilder; @@ -71,7 +72,8 @@ public class SabertekProtocolDecoder extends BaseProtocolDecoder { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next()); if (channel != null) { - channel.write(ChannelBuffers.wrappedBuffer(new byte[]{(byte) (deviceSession != null ? 0x06 : 0x15)})); + channel.writeAndFlush(new NetworkMessage( + Unpooled.wrappedBuffer(new byte[]{(byte) (deviceSession != null ? 0x06 : 0x15)}), remoteAddress)); } if (deviceSession == null) { return null; |