Skip to content

Commit

Permalink
Handle login message (fix traccar#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Jan 30, 2015
1 parent 0ee8100 commit 9c44e31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/org/traccar/protocol/Xt013ProtocolDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public Xt013ProtocolDecoder(DataManager dataManager, String protocol, Properties
}

private static final Pattern pattern = Pattern.compile(
"(?:HI,\\d+)?" +
"TK," +
"(\\d+)," + // IMEI
"(\\d{2})(\\d{2})(\\d{2})" + // Date (YYMMDD)
Expand Down
3 changes: 3 additions & 0 deletions test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public void testDecode() throws Exception {

verify(decoder.decode(null, null,
"TK,862950021650364,150118113832,+53.267722,+5.767143,0,86,12,0,F,204,08,C94,336C,22,,4.21,1,,,,,,,,"));

verify(decoder.decode(null, null,
"HI,862950021650364TK,862950021650364,150118113832,+53.267722,+5.767143,0,86,12,0,F,204,08,C94,336C,22,,4.21,1,,,,,,,,"));

}

Expand Down

0 comments on commit 9c44e31

Please sign in to comment.