aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorEdward Valley <ed.valley@yandex.com>2019-07-18 15:51:51 -0400
committerEdward Valley <ed.valley@yandex.com>2019-07-18 15:51:51 -0400
commitaef97ed2e75db35b8ababd573eccb0864da7c9e1 (patch)
tree6e114531460b3cd328eb6f1c9a24d49efe2eeeea /src/main/java/org
parentad32779b17fd4e480479b3f5702ef62443b8a387 (diff)
downloadtrackermap-server-aef97ed2e75db35b8ababd573eccb0864da7c9e1.tar.gz
trackermap-server-aef97ed2e75db35b8ababd573eccb0864da7c9e1.tar.bz2
trackermap-server-aef97ed2e75db35b8ababd573eccb0864da7c9e1.zip
Fix minor mistake about device password
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolEncoder.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolEncoder.java
index a3ceb4f30..d375730bf 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -1,3 +1,4 @@
+
/*
* Copyright 2015 - 2019 Anton Tananaev (anton@traccar.org)
*
@@ -69,15 +70,16 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
boolean alternative = Context.getIdentityManager().lookupAttributeBoolean(
command.getDeviceId(), getProtocolName() + ".alternative", false, false, true);
- initDevicePassword(command, "123456");
+ String password = Context.getIdentityManager()
+ .getDevicePassword(command.getDeviceId(), getProtocolName(), "123456");
switch (command.getType()) {
case Command.TYPE_ENGINE_STOP:
return encodeContent(command.getDeviceId(),
- alternative ? "DYD," + Command.KEY_DEVICE_PASSWORD + "#" : "Relay,1#");
+ alternative ? "DYD," + password + "#" : "Relay,1#");
case Command.TYPE_ENGINE_RESUME:
return encodeContent(command.getDeviceId(),
- alternative ? "HFYD," + Command.KEY_DEVICE_PASSWORD + "#" : "Relay,0#");
+ alternative ? "HFYD," + password + "#" : "Relay,0#");
case Command.TYPE_CUSTOM:
return encodeContent(command.getDeviceId(), command.getString(Command.KEY_DATA));
default: