aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/WondexProtocolDecoder.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-05-20 21:30:38 +0500
committerAbyss777 <abyss@fox5.ru>2016-05-20 21:30:38 +0500
commit1bc13e97012570e617856ee15e399ec6b24b86d2 (patch)
treef0097b6b33d61bfb971d08cc74e6be0dd5495e46 /src/org/traccar/protocol/WondexProtocolDecoder.java
parent970040bce55605b58e622fd382df073b5f8b97e5 (diff)
downloadtrackermap-server-1bc13e97012570e617856ee15e399ec6b24b86d2.tar.gz
trackermap-server-1bc13e97012570e617856ee15e399ec6b24b86d2.tar.bz2
trackermap-server-1bc13e97012570e617856ee15e399ec6b24b86d2.zip
Small optimization and style fix
Diffstat (limited to 'src/org/traccar/protocol/WondexProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/WondexProtocolDecoder.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java
index d35d1d930..d5c325037 100644
--- a/src/org/traccar/protocol/WondexProtocolDecoder.java
+++ b/src/org/traccar/protocol/WondexProtocolDecoder.java
@@ -60,17 +60,14 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder {
Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
if (((String) msg).startsWith("$ID:")) {
- identify(((String) msg).substring(4), channel, remoteAddress);
+ identify(((String) msg).substring(4), channel, remoteAddress);
return null;
- }
-
- else if (((String) msg).startsWith("$OK:") || ((String) msg).startsWith("$ERR:")) {
+ } else if (((String) msg).startsWith("$OK:") || ((String) msg).startsWith("$ERR:")) {
Position position = new Position();
position.setProtocol(getProtocolName());
position.setDeviceId(getDeviceId());
- getLastLocation(position, null);
- position.setTime(new Date());
+ getLastLocation(position, new Date());
position.setValid(false);
position.set(Event.KEY_RESULT, (String) msg);