diff options
-rw-r--r-- | src/org/traccar/protocol/AutoFon45ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/ProtocolDecoderTest.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java b/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java index 12020d161..8ff306c41 100644 --- a/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java +++ b/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java @@ -68,7 +68,7 @@ public class AutoFon45ProtocolDecoder extends BaseProtocolDecoder { byte[] bytes = new byte[19]; buf.readBytes(bytes); - String imei = ChannelBuffers.hexDump(ChannelBuffers.wrappedBuffer(bytes, 1, 16)).substring(1); + String imei = ChannelBuffers.hexDump(ChannelBuffers.wrappedBuffer(bytes, 1, 8)).substring(1); if (!identify(imei, channel)) { return null; } diff --git a/test/org/traccar/ProtocolDecoderTest.java b/test/org/traccar/ProtocolDecoderTest.java index b5efa7c29..133b0229f 100644 --- a/test/org/traccar/ProtocolDecoderTest.java +++ b/test/org/traccar/ProtocolDecoderTest.java @@ -38,7 +38,7 @@ public class ProtocolDecoderTest { } @Override - public Device getDeviceByUniqueId(String imei) { + public Device getDeviceByUniqueId(String uniqueId) { return createDevice(); } diff --git a/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java b/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java index 547189a1e..f739c6709 100644 --- a/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java @@ -12,6 +12,9 @@ public class AutoFon45ProtocolDecoderTest extends ProtocolDecoderTest { AutoFon45ProtocolDecoder decoder = new AutoFon45ProtocolDecoder(new AutoFon45Protocol()); verifyNothing(decoder, binary( + "41035151305289931441139602662095148807")); + + verifyNothing(decoder, binary( "41032125656985547543619173484002123481")); verifyPosition(decoder, binary( |