From a7dc44e7b2ebfd8ad70f274ce25727cc9d06118b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 20 Jan 2014 23:17:23 +1300 Subject: Fix Ruptela IMEI decoding --- src/org/traccar/protocol/RuptelaProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/org/traccar/protocol/RuptelaProtocolDecoder.java index 32bf76425..c9f8bd392 100644 --- a/src/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,7 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedShort(); // data length // Identify device - String imei = String.valueOf(buf.readLong()); + String imei = String.format("%015d", buf.readLong()); long deviceId; try { deviceId = getDataManager().getDeviceByImei(imei).getId(); -- cgit v1.2.3