diff options
Diffstat (limited to 'src/org/traccar/protocol/BceProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/BceProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/BceProtocolDecoder.java b/src/org/traccar/protocol/BceProtocolDecoder.java index 189cad754..763f35d0c 100644 --- a/src/org/traccar/protocol/BceProtocolDecoder.java +++ b/src/org/traccar/protocol/BceProtocolDecoder.java @@ -30,7 +30,7 @@ import org.traccar.model.Position; public class BceProtocolDecoder extends BaseProtocolDecoder { - public BceProtocolDecoder(String protocol) { + public BceProtocolDecoder(BceProtocol protocol) { super(protocol); } @@ -50,7 +50,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder { ChannelBuffer buf = (ChannelBuffer) msg; String imei = String.format("%015d", buf.readLong()); - if (!identify(imei)) { + if (!identify(imei, channel)) { return null; } @@ -65,7 +65,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder { while (buf.readerIndex() < dataEnd) { Position position = new Position(); - position.setProtocol(getProtocol()); + position.setProtocol(getProtocolName()); position.setDeviceId(getDeviceId()); int structEnd = buf.readUnsignedByte() + buf.readerIndex(); |