directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r454262 - in /directory: branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/ trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/
Date Mon, 09 Oct 2006 03:13:59 GMT
Author: trustin
Date: Sun Oct  8 20:13:59 2006
New Revision: 454262

URL: http://svn.apache.org/viewvc?view=rev&rev=454262
Log:
Fixed issue: DIRMINA-283 (Sessions are not recycled in IPv6 environment when bind interface
is not specified.)


Modified:
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=454262&r1=454261&r2=454262
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
Sun Oct  8 20:13:59 2006
@@ -220,7 +220,7 @@
         IoSessionRecycler sessionRecycler = getSessionRecycler( req );
         synchronized ( sessionRecycler )
         {
-            session = sessionRecycler.recycle( localAddress, remoteAddress);
+            session = sessionRecycler.recycle( localAddress, remoteAddress );
             if( session != null )
             {
                 return session;

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java?view=diff&rev=454262&r1=454261&r2=454262
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
Sun Oct  8 20:13:59 2006
@@ -78,8 +78,11 @@
         this.writeRequestQueue = new Queue();
         this.handler = defaultHandler;
         this.remoteAddress = ch.socket().getRemoteSocketAddress();
-        this.localAddress = ch.socket().getLocalSocketAddress();
-        this.serviceAddress = serviceAddress;
+
+        // We didn't set the localhost by calling getLocalSocketAddress() to avoid
+        // the case that getLocalSocketAddress() returns IPv6 address while
+        // serviceAddress represents the same address in IPv4.
+        this.localAddress = this.serviceAddress = serviceAddress;
         this.serviceConfig = serviceConfig;
 
         // Apply the initial session settings

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=454262&r1=454261&r2=454262
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
Sun Oct  8 20:13:59 2006
@@ -220,7 +220,7 @@
         IoSessionRecycler sessionRecycler = getSessionRecycler( req );
         synchronized ( sessionRecycler )
         {
-            session = sessionRecycler.recycle( localAddress, remoteAddress);
+            session = sessionRecycler.recycle( localAddress, remoteAddress );
             if( session != null )
             {
                 return session;

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java?view=diff&rev=454262&r1=454261&r2=454262
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
Sun Oct  8 20:13:59 2006
@@ -78,8 +78,11 @@
         this.writeRequestQueue = new Queue();
         this.handler = defaultHandler;
         this.remoteAddress = ch.socket().getRemoteSocketAddress();
-        this.localAddress = ch.socket().getLocalSocketAddress();
-        this.serviceAddress = serviceAddress;
+
+        // We didn't set the localhost by calling getLocalSocketAddress() to avoid
+        // the case that getLocalSocketAddress() returns IPv6 address while
+        // serviceAddress represents the same address in IPv4.
+        this.localAddress = this.serviceAddress = serviceAddress;
         this.serviceConfig = serviceConfig;
 
         // Apply the initial session settings



Mime
View raw message