diff options
Diffstat (limited to 'src/org/traccar/ExtendedObjectDecoder.java')
-rw-r--r-- | src/org/traccar/ExtendedObjectDecoder.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/ExtendedObjectDecoder.java b/src/org/traccar/ExtendedObjectDecoder.java index ad0210934..d0f82dace 100644 --- a/src/org/traccar/ExtendedObjectDecoder.java +++ b/src/org/traccar/ExtendedObjectDecoder.java @@ -16,6 +16,7 @@ package org.traccar; import java.net.SocketAddress; +import java.util.Collection; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelEvent; import org.jboss.netty.channel.ChannelHandlerContext; @@ -39,7 +40,13 @@ public abstract class ExtendedObjectDecoder implements ChannelUpstreamHandler { if (originalMessage == decodedMessage) { ctx.sendUpstream(evt); } else if (decodedMessage != null) { - fireMessageReceived(ctx, decodedMessage, e.getRemoteAddress()); + if (decodedMessage instanceof Collection) { + for (Object o : (Collection) e.getMessage()) { + fireMessageReceived(ctx, o, e.getRemoteAddress()); + } + } else { + fireMessageReceived(ctx, decodedMessage, e.getRemoteAddress()); + } } } |