aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-10-25 18:52:12 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-10-25 18:52:12 -0700
commit0dab261a9ec77811c073b328018675d5f9d71fe6 (patch)
treed2d3cd389bead742bf4b5d03e3f3ff6bdfe05247 /src/main/java/org/traccar/protocol
parent36bcdfc80dc19bc932f03bc8a0da056f46023304 (diff)
downloadtraccar-server-0dab261a9ec77811c073b328018675d5f9d71fe6.tar.gz
traccar-server-0dab261a9ec77811c073b328018675d5f9d71fe6.tar.bz2
traccar-server-0dab261a9ec77811c073b328018675d5f9d71fe6.zip
Handle no cell info
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/WatchProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java b/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java
index a6b89dde4..4990cfd65 100644
--- a/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java
@@ -143,8 +143,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
int cellCount = Integer.parseInt(values[index++]);
index += 1; // timing advance
- int mcc = Integer.parseInt(values[index++]);
- int mnc = Integer.parseInt(values[index++]);
+ int mcc = !values[index].isEmpty() ? Integer.parseInt(values[index++]) : 0;
+ int mnc = !values[index].isEmpty() ? Integer.parseInt(values[index++]) : 0;
for (int i = 0; i < cellCount; i++) {
network.addCellTower(CellTower.from(mcc, mnc,