You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2008/04/11 07:40:07 UTC

svn commit: r647053 - in /mina: branches/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/ branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/ trunk/core/src/main/java/org/apache/mina/transport/socket/

Author: trustin
Date: Thu Apr 10 22:40:04 2008
New Revision: 647053

URL: http://svn.apache.org/viewvc?rev=647053&view=rev
Log:
Fixed issue: DIRMINA-560 - SocketSessionConfigImpl IPv4 localhost TEST_ADDRESS causes server to hang
* Commented out localhost tests


Modified:
    mina/branches/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
    mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
    mina/trunk/core/src/main/java/org/apache/mina/transport/socket/DefaultSocketSessionConfig.java

Modified: mina/branches/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
URL: http://svn.apache.org/viewvc/mina/branches/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java?rev=647053&r1=647052&r2=647053&view=diff
==============================================================================
--- mina/branches/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java (original)
+++ mina/branches/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java Thu Apr 10 22:40:04 2008
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.transport.socket.nio;
 
@@ -103,17 +103,20 @@
 
     private static void initializeTestAddresses() {
         try {
+            // These two tests were disabled due to DIRMINA-560
+            // (IPv4 localhost TEST_ADDRESS causes server to hang)
+
             // IPv6 localhost
-            TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
-                    .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                            0, 0, 0, 0, 1 }), 0), InetAddress
-                    .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                            0, 0, 0, 0, 1 }));
+            //TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
+            //        .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            //                0, 0, 0, 0, 1 }), 0), InetAddress
+            //        .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            //                0, 0, 0, 0, 1 }));
 
             // IPv4 localhost
-            TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
-                    .getByAddress(new byte[] { 127, 0, 0, 1 }), 0), InetAddress
-                    .getByAddress(new byte[] { 127, 0, 0, 1 }));
+            //TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
+            //        .getByAddress(new byte[] { 127, 0, 0, 1 }), 0), InetAddress
+            //        .getByAddress(new byte[] { 127, 0, 0, 1 }));
 
             // Bind to wildcard interface and connect to IPv6 localhost
             TEST_ADDRESSES.put(new InetSocketAddress(0), InetAddress

Modified: mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java
URL: http://svn.apache.org/viewvc/mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java?rev=647053&r1=647052&r2=647053&view=diff
==============================================================================
--- mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java (original)
+++ mina/branches/1.1/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfigImpl.java Thu Apr 10 22:40:04 2008
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.transport.socket.nio;
 
@@ -103,17 +103,20 @@
 
     private static void initializeTestAddresses() {
         try {
+            // These two tests were disabled due to DIRMINA-560
+            // (IPv4 localhost TEST_ADDRESS causes server to hang)
+
             // IPv6 localhost
-            TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
-                    .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                            0, 0, 0, 0, 1 }), 0), InetAddress
-                    .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                            0, 0, 0, 0, 1 }));
+            //TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
+            //        .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            //                0, 0, 0, 0, 1 }), 0), InetAddress
+            //        .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            //                0, 0, 0, 0, 1 }));
 
             // IPv4 localhost
-            TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
-                    .getByAddress(new byte[] { 127, 0, 0, 1 }), 0), InetAddress
-                    .getByAddress(new byte[] { 127, 0, 0, 1 }));
+            //TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
+            //        .getByAddress(new byte[] { 127, 0, 0, 1 }), 0), InetAddress
+            //        .getByAddress(new byte[] { 127, 0, 0, 1 }));
 
             // Bind to wildcard interface and connect to IPv6 localhost
             TEST_ADDRESSES.put(new InetSocketAddress(0), InetAddress

Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/DefaultSocketSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/DefaultSocketSessionConfig.java?rev=647053&r1=647052&r2=647053&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/DefaultSocketSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/DefaultSocketSessionConfig.java Thu Apr 10 22:40:04 2008
@@ -90,17 +90,20 @@
 
     private static void initializeTestAddresses() {
         try {
+            // These two tests were disabled due to DIRMINA-560
+            // (IPv4 localhost TEST_ADDRESS causes server to hang)
+
             // IPv6 localhost
-            TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
-                    .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                            0, 0, 0, 0, 1 }), 0), InetAddress
-                    .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                            0, 0, 0, 0, 1 }));
+            //TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
+            //        .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            //                0, 0, 0, 0, 1 }), 0), InetAddress
+            //        .getByAddress(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            //                0, 0, 0, 0, 1 }));
 
             // IPv4 localhost
-            TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
-                    .getByAddress(new byte[] { 127, 0, 0, 1 }), 0), InetAddress
-                    .getByAddress(new byte[] { 127, 0, 0, 1 }));
+            //TEST_ADDRESSES.put(new InetSocketAddress(InetAddress
+            //        .getByAddress(new byte[] { 127, 0, 0, 1 }), 0), InetAddress
+            //        .getByAddress(new byte[] { 127, 0, 0, 1 }));
 
             // Bind to wildcard interface and connect to IPv6 localhost
             TEST_ADDRESSES.put(new InetSocketAddress(0), InetAddress
@@ -209,7 +212,7 @@
     private SocketService parent;
     private boolean defaultReuseAddress;
     private int defaultReceiveBufferSize = DEFAULT_RECEIVE_BUFFER_SIZE;
-    
+
     private boolean reuseAddress;
     private int receiveBufferSize = defaultReceiveBufferSize;
     private int sendBufferSize = DEFAULT_SEND_BUFFER_SIZE;
@@ -218,13 +221,13 @@
     private boolean oobInline = DEFAULT_OOB_INLINE;
     private int soLinger = DEFAULT_SO_LINGER;
     private boolean tcpNoDelay = DEFAULT_TCP_NO_DELAY;
-    
+
     /**
      * Creates a new instance.
      */
     public DefaultSocketSessionConfig() {
     }
-    
+
     public void init(SocketService parent) {
         this.parent = parent;
         if (parent instanceof SocketAcceptor) {
@@ -249,7 +252,7 @@
 
     public void setReceiveBufferSize(int receiveBufferSize) {
         this.receiveBufferSize = receiveBufferSize;
-        
+
         // The acceptor configures the SO_RCVBUF value of the
         // server socket when it is activated.  Consequently,
         // a newly accepted session doesn't need to update its