diff options
Diffstat (limited to 'src/org/traccar/protocol/GalileoProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/GalileoProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java index ea8ac08e7..ce8716291 100644 --- a/src/org/traccar/protocol/GalileoProtocolDecoder.java +++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java @@ -112,8 +112,7 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { @Override protected Object decode( - Channel channel, SocketAddress remoteAddress, Object msg) - throws Exception { + Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { ChannelBuffer buf = (ChannelBuffer) msg; @@ -123,8 +122,8 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { List<Position> positions = new LinkedList<>(); Set<Integer> tags = new HashSet<>(); boolean hasLocation = false; + Position position = new Position(); - position.setProtocol(getProtocolName()); while (buf.readerIndex() < length) { @@ -202,6 +201,7 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { sendReply(channel, buf.readUnsignedShort()); for (Position p : positions) { + p.setProtocol(getProtocolName()); p.setDeviceId(getDeviceId()); } |