Skip to content

Commit

Permalink
Fixed Bitrek Protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
paavalan committed Oct 22, 2018
1 parent 0968328 commit 1e469ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/org/traccar/protocol/BitrekProtocolDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public BitrekProtocolDecoder(BitrekProtocol protocol, boolean connectionless) {
private DeviceSession parseIdentification(Channel channel, SocketAddress remoteAddress, ByteBuf buf) {

int length = buf.readableBytes();
/*String imei = buf.toString(buf.readerIndex(), length, StandardCharsets.US_ASCII);*/
String imei = buf.toString(3, 15, StandardCharsets.US_ASCII);
String imei = buf.toString(buf.readerIndex(), length, StandardCharsets.US_ASCII).trim();
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, imei);

if (channel != null) {
Expand Down

0 comments on commit 1e469ae

Please sign in to comment.