From 3b6900a95342ae87861cfcae8870ac790da7a504 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 27 Jun 2023 22:33:54 -0700 Subject: Support services message type --- src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java | 2 +- .../java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java | 4 ++-- 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 positions = new LinkedList<>(); Set 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( -- cgit v1.2.3