diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-04 21:09:11 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-04 21:09:11 -0800 |
commit | 3ecc99e19384ea3d1174a5dff3703081ae1a2a0c (patch) | |
tree | d49a95c64546d9061d781c3eb20c950f29dc39c3 /src/main/java/org/traccar/protocol | |
parent | cf313ffd7b3774e4c2c328a759153e07a3c31410 (diff) | |
download | trackermap-server-3ecc99e19384ea3d1174a5dff3703081ae1a2a0c.tar.gz trackermap-server-3ecc99e19384ea3d1174a5dff3703081ae1a2a0c.tar.bz2 trackermap-server-3ecc99e19384ea3d1174a5dff3703081ae1a2a0c.zip |
Split location decoding
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java index 115884e2c..9be6442a5 100644 --- a/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 - 2020 Anton Tananaev (anton@traccar.org) + * Copyright 2013 - 2021 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,6 +101,12 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder { channel.writeAndFlush(new NetworkMessage(sentence + "#", remoteAddress)); } + return decodeLocation(channel, remoteAddress, sentence); + } + + protected Object decodeLocation( + Channel channel, SocketAddress remoteAddress, String sentence) { + Parser parser = new Parser(PATTERN, sentence); if (!parser.matches()) { return null; |