aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/OrionFrameDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 12:10:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 12:10:58 +1300
commit2e69800d0d83e3d0486b0ca0cecde7d2a451c105 (patch)
tree25307a6528d081d43de0c13e7a2f044a4dd7b7e3 /src/org/traccar/protocol/OrionFrameDecoder.java
parent3f5aef83e284a1c4f4e608d57d7f3330af6ea12a (diff)
downloadtrackermap-server-2e69800d0d83e3d0486b0ca0cecde7d2a451c105.tar.gz
trackermap-server-2e69800d0d83e3d0486b0ca0cecde7d2a451c105.tar.bz2
trackermap-server-2e69800d0d83e3d0486b0ca0cecde7d2a451c105.zip
Make protocol message types public
Diffstat (limited to 'src/org/traccar/protocol/OrionFrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/OrionFrameDecoder.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/OrionFrameDecoder.java b/src/org/traccar/protocol/OrionFrameDecoder.java
index 63bf84494..033dbd1d5 100644
--- a/src/org/traccar/protocol/OrionFrameDecoder.java
+++ b/src/org/traccar/protocol/OrionFrameDecoder.java
@@ -22,9 +22,6 @@ import org.jboss.netty.handler.codec.frame.FrameDecoder;
public class OrionFrameDecoder extends FrameDecoder {
- private static final int TYPE_USERLOG = 0;
- private static final int TYPE_SYSLOG = 3;
-
@Override
protected Object decode(
ChannelHandlerContext ctx,
@@ -37,7 +34,7 @@ public class OrionFrameDecoder extends FrameDecoder {
int type = buf.getUnsignedByte(buf.readerIndex() + 2) & 0x0f;
- if (type == TYPE_USERLOG) {
+ if (type == OrionProtocolDecoder.MSG_USERLOG) {
if (buf.readableBytes() >= length + 5) {
int index = buf.readerIndex() + 3;
@@ -58,7 +55,7 @@ public class OrionFrameDecoder extends FrameDecoder {
return buf.readBytes(length);
}
}
- } else if (type == TYPE_SYSLOG) {
+ } else if (type == OrionProtocolDecoder.MSG_SYSLOG) {
if (buf.readableBytes() >= length + 12) {
length += buf.getUnsignedShort(buf.readerIndex() + 8);
if (buf.readableBytes() >= length) {