aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-19 10:50:29 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-19 10:50:29 +1300
commit86c0a49ceb012c36fe0bc30be63e27e7608d0f63 (patch)
tree604080bf4074f29a88d1f6180f313c549ff17bba /src/org/traccar
parentc5e7beb05968c8e7e3fb5f9ed4434c8abc324a59 (diff)
downloadtrackermap-server-86c0a49ceb012c36fe0bc30be63e27e7608d0f63.tar.gz
trackermap-server-86c0a49ceb012c36fe0bc30be63e27e7608d0f63.tar.bz2
trackermap-server-86c0a49ceb012c36fe0bc30be63e27e7608d0f63.zip
Properly handle empty messages
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index 71f493318..813d58ba8 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -237,7 +237,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
this.position = null;
return position;
}
- } else if (Character.isDigit(sentence.charAt(0)) && sentence.length() == 15) {
+ } else if (sentence.length() == 15 && Character.isDigit(sentence.charAt(0))) {
identify(sentence, channel, remoteAddress);
} else if (sentence.startsWith("$GPRMC")) {
return decodeGprmc(sentence, remoteAddress, channel);