aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
index 7947d0c26..f3b70e40c 100644
--- a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2020 - 2021 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.
@@ -83,7 +83,7 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder {
protected Object decode(
Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
- String sentence = (String) msg;
+ String sentence = ((String) msg).trim();
String type = sentence.substring(21, sentence.indexOf(',', 21));
if (channel != null) {