aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/AquilaProtocolDecoder.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/AquilaProtocolDecoder.java b/src/org/traccar/protocol/AquilaProtocolDecoder.java
index 8e9dd278a..9963ead34 100644
--- a/src/org/traccar/protocol/AquilaProtocolDecoder.java
+++ b/src/org/traccar/protocol/AquilaProtocolDecoder.java
@@ -17,6 +17,7 @@ package org.traccar.protocol;
import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
+import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
@@ -269,7 +270,8 @@ public class AquilaProtocolDecoder extends BaseProtocolDecoder {
return null;
}
- DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
+ String id = parser.next();
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, id);
if (deviceSession == null) {
return null;
}
@@ -297,6 +299,11 @@ public class AquilaProtocolDecoder extends BaseProtocolDecoder {
if (parser.nextInt() == 1) {
position.set(Position.KEY_ALARM, Position.ALARM_SOS);
+ if (channel != null) {
+ String password = Context.getIdentityManager().lookupAttributeString(
+ position.getDeviceId(), getProtocolName() + ".language", "aquila123", true);
+ channel.write("#set$" + id + "@" + password + "#EMR_MODE:0*");
+ }
}
Network network = new Network();