aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-06-27 22:33:54 -0700
committerAnton Tananaev <anton@traccar.org>2023-06-27 22:33:54 -0700
commit3b6900a95342ae87861cfcae8870ac790da7a504 (patch)
treeb354c0ab00cfd482f9bc05eb70d6556eef13c566
parent2088a59da55e581391f9a768003b68baca467007 (diff)
downloadtrackermap-server-3b6900a95342ae87861cfcae8870ac790da7a504.tar.gz
trackermap-server-3b6900a95342ae87861cfcae8870ac790da7a504.tar.bz2
trackermap-server-3b6900a95342ae87861cfcae8870ac790da7a504.zip
Support services message type
-rw-r--r--src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
index f8b0c34e9..cd8d8e0cf 100644
--- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
@@ -151,7 +151,7 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder {
sendResponse(channel, remoteAddress, index, type, buf);
}
- if (type == MSG_DATA) {
+ if (type == MSG_DATA || type == MSG_SERVICES) {
List<Position> positions = new LinkedList<>();
Set<Integer> keys = new HashSet<>();
diff --git a/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
index 693a11fc5..587a520d1 100644
--- a/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
@@ -24,10 +24,10 @@ public class Minifinder2ProtocolDecoderTest extends ProtocolTest {
verifyPositions(decoder, binary(
"ab10350015ae59010110013836333932313033333836353231360924723a12610042535a182ac0f6b4f2923100c900af02215c2b9bfb5461736b4c4d53"));
- verifyNull(decoder, binary(
+ verifyPositions(decoder, false, binary(
"ab10150076f1320003100133353534363530373130323933303602105a"));
- verifyNull(decoder, binary(
+ verifyPositions(decoder, false, binary(
"AB101400594A01000310013836333932323033343437333734350112"));
verifyPositions(decoder, binary(