aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gl100Protocol.java9
-rw-r--r--src/org/traccar/protocol/Gl100ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Gl200Protocol.java1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gl100Protocol.java b/src/org/traccar/protocol/Gl100Protocol.java
index 9867c653a..cc2c826ab 100644
--- a/src/org/traccar/protocol/Gl100Protocol.java
+++ b/src/org/traccar/protocol/Gl100Protocol.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.string.StringDecoder;
@@ -42,6 +43,14 @@ public class Gl100Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new Gl100ProtocolDecoder(Gl100Protocol.this));
}
});
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("objectDecoder", new Gl100ProtocolDecoder(Gl100Protocol.this));
+ }
+ });
}
}
diff --git a/src/org/traccar/protocol/Gl100ProtocolDecoder.java b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
index 1a144ae27..db5e60838 100644
--- a/src/org/traccar/protocol/Gl100ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
@@ -37,7 +37,7 @@ public class Gl100ProtocolDecoder extends BaseProtocolDecoder {
.groupBegin()
.number("d+,") // number
.number("d,") // reserved / geofence id
- .number("d") // reserved / geofence alert
+ .number("d+") // reserved / geofence alert // battery
.or()
.number("[^,]*") // calling number
.groupEnd(",")
diff --git a/src/org/traccar/protocol/Gl200Protocol.java b/src/org/traccar/protocol/Gl200Protocol.java
index f007001c0..4162b0fc2 100644
--- a/src/org/traccar/protocol/Gl200Protocol.java
+++ b/src/org/traccar/protocol/Gl200Protocol.java
@@ -46,7 +46,6 @@ public class Gl200Protocol extends BaseProtocol {
serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
-
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(Gl200Protocol.this));