aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}