aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ExtendedObjectDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-15 02:47:53 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-15 10:49:11 +1300
commit197510809bd2b59f3d13a8f36626cec2dfe25cb6 (patch)
tree9d3d51930750ad436fb9b1ae322d38ca6f9b7cc9 /src/org/traccar/ExtendedObjectDecoder.java
parentd2119238ae75b7a6cf462c223b6017d3b37909ad (diff)
downloadtrackermap-server-197510809bd2b59f3d13a8f36626cec2dfe25cb6.tar.gz
trackermap-server-197510809bd2b59f3d13a8f36626cec2dfe25cb6.tar.bz2
trackermap-server-197510809bd2b59f3d13a8f36626cec2dfe25cb6.zip
Reuse deviceId from position (fix #2660)
Diffstat (limited to 'src/org/traccar/ExtendedObjectDecoder.java')
-rw-r--r--src/org/traccar/ExtendedObjectDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/ExtendedObjectDecoder.java b/src/org/traccar/ExtendedObjectDecoder.java
index ec03afa60..268e6f688 100644
--- a/src/org/traccar/ExtendedObjectDecoder.java
+++ b/src/org/traccar/ExtendedObjectDecoder.java
@@ -56,7 +56,7 @@ public abstract class ExtendedObjectDecoder implements ChannelUpstreamHandler {
MessageEvent e = (MessageEvent) evt;
Object originalMessage = e.getMessage();
Object decodedMessage = decode(e.getChannel(), e.getRemoteAddress(), originalMessage);
- onMessageEvent(e.getChannel(), e.getRemoteAddress(), originalMessage); // call after decode
+ onMessageEvent(e.getChannel(), e.getRemoteAddress(), originalMessage, decodedMessage);
if (originalMessage == decodedMessage) {
ctx.sendUpstream(evt);
} else {
@@ -77,7 +77,8 @@ public abstract class ExtendedObjectDecoder implements ChannelUpstreamHandler {
}
}
- protected void onMessageEvent(Channel channel, SocketAddress remoteAddress, Object msg) {
+ protected void onMessageEvent(
+ Channel channel, SocketAddress remoteAddress, Object originalMessage, Object decodedMessage) {
}
protected Object handleEmptyMessage(Channel channel, SocketAddress remoteAddress, Object msg) {