aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
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