You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2015/10/07 18:31:23 UTC
[1/2] mina git commit: Fix for DIRMINA-934/DIRMINA-1013
Repository: mina
Updated Branches:
refs/heads/2.0 ca76211d0 -> 79c4f4173
Fix for DIRMINA-934/DIRMINA-1013
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/849e22af
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/849e22af
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/849e22af
Branch: refs/heads/2.0
Commit: 849e22afc822a5742756f5f729627cd4806ee717
Parents: bcf26ea
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Wed Oct 7 18:30:25 2015 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Wed Oct 7 18:30:25 2015 +0200
----------------------------------------------------------------------
.../apache/mina/filter/codec/ProtocolCodecFilter.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/849e22af/mina-core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java b/mina-core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
index c490226..30a1bcf 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
@@ -21,7 +21,6 @@ package org.apache.mina.filter.codec;
import java.net.SocketAddress;
import java.util.Queue;
-import java.util.concurrent.Semaphore;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.file.FileRegion;
@@ -66,8 +65,6 @@ public class ProtocolCodecFilter extends IoFilterAdapter {
/** The factory responsible for creating the encoder and decoder */
private final ProtocolCodecFactory factory;
- private final Semaphore lock = new Semaphore(1, true);
-
/**
* Creates a new instance of ProtocolCodecFilter, associating a factory
* for the creation of the encoder and decoder.
@@ -228,9 +225,10 @@ public class ProtocolCodecFilter extends IoFilterAdapter {
while (in.hasRemaining()) {
int oldPos = in.position();
try {
- lock.acquire();
- // Call the decoder with the read bytes
- decoder.decode(session, in, decoderOut);
+ synchronized (session) {
+ // Call the decoder with the read bytes
+ decoder.decode(session, in, decoderOut);
+ }
// Finish decoding if no exception was thrown.
decoderOut.flush(nextFilter, session);
} catch (Exception e) {
@@ -257,8 +255,6 @@ public class ProtocolCodecFilter extends IoFilterAdapter {
if (!(e instanceof RecoverableProtocolDecoderException) || (in.position() == oldPos)) {
break;
}
- } finally {
- lock.release();
}
}
}
[2/2] mina git commit: Merge branch '2.0' of
https://git-wip-us.apache.org/repos/asf/mina into 2.0
Posted by el...@apache.org.
Merge branch '2.0' of https://git-wip-us.apache.org/repos/asf/mina into 2.0
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/79c4f417
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/79c4f417
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/79c4f417
Branch: refs/heads/2.0
Commit: 79c4f417308baffaa97246d747de9410a1d251a6
Parents: 849e22a ca76211
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Wed Oct 7 18:31:06 2015 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Wed Oct 7 18:31:06 2015 +0200
----------------------------------------------------------------------
.../test/java/org/apache/mina/filter/firewall/SubnetIPv4Test.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------