diff options
author | Anton Tananaev <anton@traccar.org> | 2023-07-14 06:49:08 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-07-14 06:49:08 -0700 |
commit | 104e8a4a7829b4b4a4723a715cc2b15899fa8b9f (patch) | |
tree | 97f20ef8462f3293fb86d4e837c775e53b2d1868 /src/main/java/org/traccar/protocol | |
parent | 105873ab5256a774ef07ca7ee459da0917829591 (diff) | |
download | trackermap-server-104e8a4a7829b4b4a4723a715cc2b15899fa8b9f.tar.gz trackermap-server-104e8a4a7829b4b4a4723a715cc2b15899fa8b9f.tar.bz2 trackermap-server-104e8a4a7829b4b4a4723a715cc2b15899fa8b9f.zip |
Option to disable Topic commands
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/TopinProtocol.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/TopinProtocol.java b/src/main/java/org/traccar/protocol/TopinProtocol.java index b15373d71..37afac582 100644 --- a/src/main/java/org/traccar/protocol/TopinProtocol.java +++ b/src/main/java/org/traccar/protocol/TopinProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 - 2021 Anton Tananaev (anton@traccar.org) + * Copyright 2019 - 2023 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import org.traccar.BaseProtocol; import org.traccar.PipelineBuilder; import org.traccar.TrackerServer; import org.traccar.config.Config; +import org.traccar.config.Keys; import org.traccar.model.Command; import javax.inject.Inject; @@ -27,8 +28,10 @@ public class TopinProtocol extends BaseProtocol { @Inject public TopinProtocol(Config config) { - setSupportedDataCommands( - Command.TYPE_SOS_NUMBER); + if (!config.getBoolean(Keys.PROTOCOL_DISABLE_COMMANDS.withPrefix(getName()))) { + setSupportedDataCommands( + Command.TYPE_SOS_NUMBER); + } addServer(new TrackerServer(config, getName(), false) { @Override protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) { |