aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Mta6Protocol.java4
-rw-r--r--src/org/traccar/protocol/XexunProtocol.java2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 3f21beea8..fcfcb3dbb 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -73,7 +73,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
if (channel != null) {
channel.write("LOAD", remoteAddress);
Matcher handshakeMatcher = handshakePattern.matcher(sentence);
- if(handshakeMatcher.matches()) {
+ if (handshakeMatcher.matches()) {
identify(handshakeMatcher.group(1), channel);
}
}
diff --git a/src/org/traccar/protocol/Mta6Protocol.java b/src/org/traccar/protocol/Mta6Protocol.java
index fb610227d..7281c4f1d 100644
--- a/src/org/traccar/protocol/Mta6Protocol.java
+++ b/src/org/traccar/protocol/Mta6Protocol.java
@@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.http.HttpRequestDecoder;
import org.jboss.netty.handler.codec.http.HttpResponseEncoder;
import org.traccar.BaseProtocol;
+import org.traccar.Context;
import org.traccar.TrackerServer;
import org.traccar.protocol.commands.CommandTemplate;
import org.traccar.http.commands.CommandType;
@@ -40,7 +41,8 @@ public class Mta6Protocol extends BaseProtocol {
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpDecoder", new HttpRequestDecoder());
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
- pipeline.addLast("objectDecoder", new Mta6ProtocolDecoder(Mta6Protocol.this, false));
+ pipeline.addLast("objectDecoder", new Mta6ProtocolDecoder(
+ Mta6Protocol.this, !Boolean.valueOf(Context.getProps().getProperty(getName() + ".can"))));
}
});
}
diff --git a/src/org/traccar/protocol/XexunProtocol.java b/src/org/traccar/protocol/XexunProtocol.java
index 6ce55b30e..0d4502a3a 100644
--- a/src/org/traccar/protocol/XexunProtocol.java
+++ b/src/org/traccar/protocol/XexunProtocol.java
@@ -39,7 +39,7 @@ public class XexunProtocol extends BaseProtocol {
serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- if (Boolean.valueOf(Context.getProps().getProperty(XexunProtocol.this.getName() + ".extended"))) {
+ if (Boolean.valueOf(Context.getProps().getProperty(getName() + ".extended"))) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024)); // tracker bug \n\r
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectDecoder", new Xexun2ProtocolDecoder(XexunProtocol.this));