directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r165239 - /directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java /directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramConnector.java
Date Fri, 29 Apr 2005 00:14:37 GMT
Author: trustin
Date: Thu Apr 28 17:14:37 2005
New Revision: 165239

URL: http://svn.apache.org/viewcvs?rev=165239&view=rev
Log:
* Fixed: DatagramConnector doesn't increase readBytes and writtenBytes.



Modified:
    directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java
    directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramConnector.java

Modified: directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java?rev=165239&r1=165238&r2=165239&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java Thu
Apr 28 17:14:37 2005
@@ -397,7 +397,7 @@
                 // Kernel buffer is full
                 key.interestOps( key.interestOps() | SelectionKey.OP_WRITE );
             }
-            else
+            else if( writtenBytes > 0 )
             {
                 key.interestOps( key.interestOps()
                                  & ( ~SelectionKey.OP_WRITE ) );

Modified: directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramConnector.java?rev=165239&r1=165238&r2=165239&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramConnector.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/io/datagram/DatagramConnector.java Thu
Apr 28 17:14:37 2005
@@ -315,6 +315,7 @@
                 newBuf.put( readBuf );
                 newBuf.flip();
 
+		session.increseReadBytes( readBytes );
                 filters.dataRead( session, newBuf );
             }
         }
@@ -406,7 +407,7 @@
                 // Kernel buffer is full
                 key.interestOps( key.interestOps() | SelectionKey.OP_WRITE );
             }
-            else
+            else if( writtenBytes > 0 )
             {
                 key.interestOps( key.interestOps()
                                  & ( ~SelectionKey.OP_WRITE ) );
@@ -417,6 +418,8 @@
                     writeBufferQueue.pop();
                     writeMarkerQueue.pop();
                 }
+
+                session.increaseWrittenBytes( writtenBytes );
                 session.getManagerFilterChain().dataWritten( session, marker );
             }
         }



Mime
View raw message