aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-11 22:42:08 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-11 22:42:08 +1200
commitff1b03e46767d92432827f3bad8e6b0e124dd33a (patch)
tree97a27db45432191bd7f698d18ca100b84171fe95 /src/org/traccar/protocol
parent204413667375b2ea561b80555ae0c4e6115ff15b (diff)
downloadtraccar-server-ff1b03e46767d92432827f3bad8e6b0e124dd33a.tar.gz
traccar-server-ff1b03e46767d92432827f3bad8e6b0e124dd33a.tar.bz2
traccar-server-ff1b03e46767d92432827f3bad8e6b0e124dd33a.zip
Fix Castel protocol identification
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