diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-09 00:14:16 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-09 00:14:16 +1200 |
commit | ba67624e3c4d18f313aa0167d7276a58bdbac445 (patch) | |
tree | 166b4afd253311f545d1d9f7c5833f6f30dacdce /src/org | |
parent | a169ff4eb6c1de110ddcedebdec77fb7aae05a33 (diff) | |
download | traccar-server-ba67624e3c4d18f313aa0167d7276a58bdbac445.tar.gz traccar-server-ba67624e3c4d18f313aa0167d7276a58bdbac445.tar.bz2 traccar-server-ba67624e3c4d18f313aa0167d7276a58bdbac445.zip |
Move response to the top
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/SviasProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/SviasProtocolDecoder.java b/src/org/traccar/protocol/SviasProtocolDecoder.java index 9375038ed..c2ea33ae9 100644 --- a/src/org/traccar/protocol/SviasProtocolDecoder.java +++ b/src/org/traccar/protocol/SviasProtocolDecoder.java @@ -61,6 +61,10 @@ public class SviasProtocolDecoder extends BaseProtocolDecoder { protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
+ if (channel != null) {
+ channel.write("@");
+ }
+
Parser parser = new Parser(PATTERN, (String) msg);
if (!parser.matches()) {
return null;
@@ -93,10 +97,6 @@ public class SviasProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY_LEVEL, parser.nextInt());
position.set(Position.KEY_RSSI, parser.nextInt());
- if (channel != null) {
- channel.write("@");
- }
-
return position;
}
|