aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-09 00:14:16 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-09 00:14:16 +1200
commitba67624e3c4d18f313aa0167d7276a58bdbac445 (patch)
tree166b4afd253311f545d1d9f7c5833f6f30dacdce /src/org
parenta169ff4eb6c1de110ddcedebdec77fb7aae05a33 (diff)
downloadtraccar-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.java8
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;
}