tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java
Date Sat, 23 Apr 2005 18:59:52 GMT
remm        2005/04/23 11:59:52

  Modified:    util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  - Convert to long.
  
  Revision  Changes    Path
  1.19      +6 -7      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
  
  Index: AprEndpoint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AprEndpoint.java	23 Apr 2005 17:36:57 -0000	1.18
  +++ AprEndpoint.java	23 Apr 2005 18:59:52 -0000	1.19
  @@ -1064,14 +1064,13 @@
                   // Set the socket to nonblocking mode
                   Socket.optSet(socket, Socket.APR_SO_NONBLOCK, 1);
                   while (true) {
  -                    int nw = Socket.sendfile(socket, data.fd, null, null,
  -                                             data.pos, (int)data.end, 0);
  +                    long nw = Socket.sendfile(socket, data.fd, null, null,
  +                                             data.pos, data.end, 0);
                       if (nw < 0) {
  -                        if (!Status.APR_STATUS_IS_EAGAIN(-nw)) {
  +                        if (!Status.APR_STATUS_IS_EAGAIN((int) -nw)) {
                               Poll.destroy(data.pool);
                               return false;
  -                        }
  -                        else {
  +                        } else {
                               // Break the loop and add the socket to poller.
                               break;    
                           }
  @@ -1165,9 +1164,9 @@
                                   continue;
                               }
                               // Write some data using sendfile
  -                            int nw = Socket.sendfile(desc[n*4+1], state.fd,
  +                            long nw = Socket.sendfile(desc[n*4+1], state.fd,
                                                        null, null, state.pos,
  -                                                     (int) (state.end - state.pos), 0);
  +                                                     state.end - state.pos, 0);
                               if (nw < 0) {
                                   // Close socket and clear pool
                                   remove(desc[n*4+1]);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message