directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r383039 - in /directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support: DatagramAcceptorDelegate.java DatagramConnectorDelegate.java DatagramSessionImpl.java SocketSessionImpl.java
Date Sat, 04 Mar 2006 05:24:03 GMT
Author: trustin
Date: Fri Mar  3 21:23:58 2006
New Revision: 383039

URL: http://svn.apache.org/viewcvs?rev=383039&view=rev
Log:
Fixed issue: DIRMINA-180 (StreamWriteFilterTest.testWriteUsingSocketTransport fails on OS
X)
* Applied Peter's patch: setTrafficClass is called only when a new value is specified to work
around the MacOS X issue.



Modified:
    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/DatagramConnectorDelegate.java
    directory/trunks/mina/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/SocketSessionImpl.java

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?rev=383039&r1=383038&r2=383039&view=diff
==============================================================================
--- 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
Fri Mar  3 21:23:58 2006
@@ -544,8 +544,12 @@
                 ch.socket().setBroadcast( cfg.isBroadcast() );
                 ch.socket().setReceiveBufferSize( cfg.getReceiveBufferSize() );
                 ch.socket().setSendBufferSize( cfg.getSendBufferSize() );
-                ch.socket().setTrafficClass( cfg.getTrafficClass() );
-                
+
+                if( ch.socket().getTrafficClass() != cfg.getTrafficClass() )
+                {
+                    ch.socket().setTrafficClass( cfg.getTrafficClass() );
+                }
+
                 ch.configureBlocking( false );
                 ch.socket().bind( req.address );
                 ch.register( selector, SelectionKey.OP_READ, req );

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?rev=383039&r1=383038&r2=383039&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
Fri Mar  3 21:23:58 2006
@@ -114,7 +114,11 @@
             ch.socket().setBroadcast( cfg.isBroadcast() );
             ch.socket().setReceiveBufferSize( cfg.getReceiveBufferSize() );
             ch.socket().setSendBufferSize( cfg.getSendBufferSize() );
-            ch.socket().setTrafficClass( cfg.getTrafficClass() );
+
+            if( ch.socket().getTrafficClass() != cfg.getTrafficClass() )
+            {
+                ch.socket().setTrafficClass( cfg.getTrafficClass() );
+            }
 
             if( localAddress != null )
             {

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java?rev=383039&r1=383038&r2=383039&view=diff
==============================================================================
--- 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
Fri Mar  3 21:23:58 2006
@@ -86,7 +86,11 @@
             this.readBufferSize = cfg.getReceiveBufferSize();
             this.config.setReuseAddress( cfg.isReuseAddress() );
             this.config.setSendBufferSize( cfg.getSendBufferSize() );
-            this.config.setTrafficClass( cfg.getTrafficClass() );
+
+            if( this.config.getTrafficClass() != cfg.getTrafficClass() )
+            {
+                this.config.setTrafficClass( cfg.getTrafficClass() );
+            }
         }
     }
     

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/SocketSessionImpl.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/SocketSessionImpl.java?rev=383039&r1=383038&r2=383039&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/SocketSessionImpl.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/SocketSessionImpl.java
Fri Mar  3 21:23:58 2006
@@ -92,7 +92,11 @@
             this.config.setSendBufferSize( cfg.getSendBufferSize() );
             this.config.setSoLinger( cfg.getSoLinger() );
             this.config.setTcpNoDelay( cfg.isTcpNoDelay() );
-            this.config.setTrafficClass( cfg.getTrafficClass() );
+
+            if( this.config.getTrafficClass() != cfg.getTrafficClass() )
+            {
+                this.config.setTrafficClass( cfg.getTrafficClass() );
+            }
         }
     }
     



Mime
View raw message