aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-06-04 22:01:51 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-06-04 22:01:51 +1200
commit4e8e09e468213c9ffd466b7334e4960de962134d (patch)
treeaa0b165f5e1149e5d2393e6712c766f28c0ab109 /src/org/traccar/protocol
parent3ae842837ddc8b0070a726d4e25cb700d30f286b (diff)
downloadtrackermap-server-4e8e09e468213c9ffd466b7334e4960de962134d.tar.gz
trackermap-server-4e8e09e468213c9ffd466b7334e4960de962134d.tar.bz2
trackermap-server-4e8e09e468213c9ffd466b7334e4960de962134d.zip
Update GS decoder
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index f4aa94110..a2b115445 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -39,16 +39,16 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
super(serverManager);
// Initialize format strings
- Properties p = getServerManager().getProperties();
- if (p.contains("globalsat.format0")) {
- format0 = p.getProperty("globalsat.format0");
- } else {
- format0 = "TSPRXAB27GHKLMnaicz*U!";
- }
- if (p.contains("globalsat.format1")) {
- format1 = p.getProperty("globalsat.format1");
- } else {
- format1 = "SARY*U!";
+ format0 = "TSPRXAB27GHKLMnaicz*U!";
+ format1 = "SARY*U!";
+ if (getServerManager() != null) {
+ Properties p = getServerManager().getProperties();
+ if (p.contains("globalsat.format0")) {
+ format0 = p.getProperty("globalsat.format0");
+ }
+ if (p.contains("globalsat.format1")) {
+ format1 = p.getProperty("globalsat.format1");
+ }
}
}