From ff1b03e46767d92432827f3bad8e6b0e124dd33a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 11 Jun 2015 22:42:08 +1200 Subject: Fix Castel protocol identification --- src/org/traccar/protocol/CastelProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java index c919ec936..e82f837a7 100644 --- a/src/org/traccar/protocol/CastelProtocolDecoder.java +++ b/src/org/traccar/protocol/CastelProtocolDecoder.java @@ -73,7 +73,6 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { } else if (type == MSG_LOGIN || type == MSG_GPS) { Position position = new Position(); - position.setDeviceId(getDeviceId()); position.setProtocol(getProtocol()); if (!identify(id.toString(Charset.defaultCharset()).trim())) { @@ -96,6 +95,8 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { } } + + position.setDeviceId(getDeviceId()); if (type == MSG_GPS) { buf.readUnsignedByte(); // historical -- cgit v1.2.3