aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/WatchProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/WatchProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/WatchProtocol.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/WatchProtocol.java b/src/main/java/org/traccar/protocol/WatchProtocol.java
index fe96b3828..600f81328 100644
--- a/src/main/java/org/traccar/protocol/WatchProtocol.java
+++ b/src/main/java/org/traccar/protocol/WatchProtocol.java
@@ -21,9 +21,12 @@ import org.traccar.TrackerServer;
import org.traccar.config.Config;
import org.traccar.model.Command;
+import javax.inject.Inject;
+
public class WatchProtocol extends BaseProtocol {
- public WatchProtocol() {
+ @Inject
+ public WatchProtocol(Config config) {
setSupportedDataCommands(
Command.TYPE_CUSTOM,
Command.TYPE_POSITION_SINGLE,
@@ -41,7 +44,7 @@ public class WatchProtocol extends BaseProtocol {
Command.TYPE_VOICE_MESSAGE,
Command.TYPE_SET_TIMEZONE,
Command.TYPE_SET_INDICATOR);
- addServer(new TrackerServer(false, getName()) {
+ addServer(new TrackerServer(config, getName(), false) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new WatchFrameDecoder());